[PATCH 09/10] debugger.c: correct return type from getppid() (Solaris support)

2012-11-04 Thread Blake Jones
Cast the return value of getppid() to int from pid_t in debugger.c, since it is being passed to sprintf(%d), which wants an int argument. On Solaris, pid_t is a long for 32-bit programs. --- debugger.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugger.c b/debugger.c

[PATCH 04/10] configure: check for -Wl,-rpath (Solaris support)

2012-11-04 Thread Blake Jones
Add a check to configure to see whether -Wl,-rpath can be used without --enable-new-dtags. Solaris needs the former and doesn't know about the latter. --- configure |4 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 28d4110..5c5139f 100755 --- a/configure +++

[PATCH 08/10] notmuch-config: header for index() prototype (Solaris support)

2012-11-04 Thread Blake Jones
Linux, FreeBSD, and Solaris all expect to find the prototype for index() in strings.h. On some operating systems, including string.h is sufficient to get the prototype, but that's not the case on Solaris. This patch just modifies notmuch-config.c to include strings.h to get the prototype. ---

[PATCH 03/10] gethostbyname: check for libnsl (Solaris support)

2012-11-04 Thread Blake Jones
Add a check to configure to see whether -lnsl is needed for programs that are using gethostbyname(). This change also adds the file compat/check_ghbn.c, which configure uses to perform its check. --- compat/check_ghbn.c |8 configure | 17 - 2 files

[PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-04 Thread Blake Jones
The timegm(3) function is a non-standard extension to libc which is available in GNU libc and on some BSDs. Although SunOS had this function in its libc, Solaris (unfortunately) removed it. This patch implements a very simple version of timegm() which is good enough for parse-time-string.c.

[PATCH 01/10] getpwuid: check for standards compliance (Solaris support)

2012-11-04 Thread Blake Jones
Add checks to configure to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for getpwuid_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH 07/10] gen-version-script: parse Solaris nm output (Solaris support)

2012-11-04 Thread Blake Jones
The output of nm on Solaris is substantially different from that on Linux, and the current version of gen-version-script is tied to the Linux nm output. This patch separates the parts of nm processing which are dependent on the output format into a couple shell functions, and makes another shell

[PATCH 02/10] asctime: check for standards compliance (Solaris support)

2012-11-04 Thread Blake Jones
Add checks to configure to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for asctime_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH 06/10] strsep: check for availability (Solaris support)

2012-11-04 Thread Blake Jones
Solaris does not ship a version of the strsep() function. This change adds a check to configure to see whether notmuch needs to provide its own implementation, and if so, it uses the new version in compat/strsep.c (which was copied from Mutt, and apparently before that from glibc). ---

[PATCH 05/10] install: check for non-SysV version (Solaris support)

2012-11-04 Thread Blake Jones
Solaris ships a program called install in /usr/sbin, which performs a task that's fairly similar to the GNU and BSD install programs but which uses very different command line arguments. In particular, if it is invoked without -c, -f, or -n, it will search the target directory for a file with the

[PATCH 00/10] Solaris support

2012-11-04 Thread Blake Jones
Hi all, This patch series fixes several issues which are needed to allow notmuch to build on Solaris 11. I've been testing it for a month or so by using Karel Zak's fork of mutt along with a copy of notmuch-0.13.2 that I got to compile. After a friend asked for a copy of my setup, I decided to

Re: [PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-04 Thread Blake Jones
Hi Jani, I'd prefer to use timegm() where available, and the suggested alternative [1] elsewhere. [1] http://www.kernel.org/doc/man-pages/online/pages/man3/timegm.3.html I considered this alternative, but decided against it because it's completely MT-unsafe. I don't know whether libnotmuch

Re: [PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-04 Thread Blake Jones
That is a valid point. Yet it doesn't change the fact that I'd prefer to use timegm() where available. Internally, glibc uses the same code to implement both timegm() and mktime(), and I'd hate it if the results were subtly different depending on whether the time zone was specified in the

Re: [PATCH 08/10] notmuch-config: header for index() prototype (Solaris support)

2012-11-04 Thread Blake Jones
On Sun, 04 Nov 2012, Blake Jones bla...@foo.net wrote: Linux, FreeBSD, and Solaris all expect to find the prototype for index() in strings.h. On some operating systems, including string.h is sufficient to get the prototype, but that's not the case on Solaris. This patch just modifies

Re: [PATCH 05/10] install: check for non-SysV version (Solaris support)

2012-11-05 Thread Blake Jones
On Mon, 05 Nov 2012, Blake Jones bla...@foo.net wrote: +INSTALL=install +printf Checking for working \install\ program... +mkdir _tmp_ This doesn't feel like a hot idea. Out of curiosity, why not? Note that I'm only referring to creating temp directories like this to check

Re: [PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-05 Thread Blake Jones
Yet another idea for an alternative. Compile by entering 'sh xtimegm.c' and then run ./xtimegm Simple cases seems to work. Dst change may (or then may not) give one hour difference to the expected. The test coverage could be easily expanded to that ;) Hmm, I also found this:

Re: [PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-05 Thread Blake Jones
The other approaches rely on letting libc do all the hard work of time zone manipulation, and then reading the tea leaves to find a way to undo it. Did you look at the gnu libc version -- I bet it is pretty hairy... I didn't look at either the GNU or the Solaris libc version. But the file

Re: [PATCH 00/10] Solaris support

2012-11-05 Thread Blake Jones
Just now I don't have more time to comment and review more, but in the first 2/3 patches when I tried to compile I got problem NULL not defined. Oh! Yes, I should include stdio.h to pull in the definition of NULL. I'll fix that. Another thing: you have this +# Whether the asctime_r

[PATCH v2 00/10] Solaris support

2012-11-05 Thread Blake Jones
Thanks to Jani Nikula and Tomi Ollila for their comments. Changes since last version: - Add feature test for timegm(); move portable implementation of timegm() into compat/, change libparse-time-string to pull in .o's from compat/. - Include stdio.h in compat/check_*.c, to get definition

[PATCH v2 01/10] getpwuid: check for standards compliance (Solaris support)

2012-11-05 Thread Blake Jones
Add checks to configure to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for getpwuid_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH v2 02/10] asctime: check for standards compliance (Solaris support)

2012-11-05 Thread Blake Jones
Add checks to configure to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for asctime_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH v2 04/10] configure: check for -Wl,-rpath (Solaris support)

2012-11-05 Thread Blake Jones
Add a check to configure to see whether -Wl,-rpath can be used without --enable-new-dtags. Solaris needs the former and doesn't know about the latter. --- configure |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 9707f11..c9da667 100755 ---

[PATCH v2 06/10] strsep: check for availability (Solaris support)

2012-11-05 Thread Blake Jones
Solaris does not ship a version of the strsep() function. This change adds a check to configure to see whether notmuch needs to provide its own implementation, and if so, it uses the new version in compat/strsep.c (which was copied from Mutt, and apparently before that from glibc). ---

[PATCH v2 05/10] install: check for non-SysV version (Solaris support)

2012-11-05 Thread Blake Jones
Solaris ships a program called install in /usr/sbin, which performs a task that's fairly similar to the GNU and BSD install programs but which uses very different command line arguments. In particular, if it is invoked without -c, -f, or -n, it will search the target directory for a file with the

[PATCH v2 08/10] notmuch-config: use strchr(), not index() (Solaris support)

2012-11-05 Thread Blake Jones
notmuch-config.c has the only use of the function named index() in the notmuch source. Several other places use the equivalent function strchr(); this patch just fixes notmuch-config.c to use strchr() instead. (Solaris needs to include strings.h to get the prototype for index(), and

[PATCH v2 07/10] gen-version-script: parse Solaris nm output (Solaris support)

2012-11-05 Thread Blake Jones
The output of nm on Solaris is substantially different from that on Linux, and the current version of gen-version-script is tied to the Linux nm output. This patch separates the parts of nm processing which are dependent on the output format into a couple shell functions, and makes another shell

[PATCH v2 09/10] debugger.c: correct return type from getppid() (Solaris support)

2012-11-05 Thread Blake Jones
Cast the return value of getppid() to int from pid_t in debugger.c, since it is being passed to sprintf(%d), which wants an int argument. On Solaris, pid_t is a long for 32-bit programs. --- debugger.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/debugger.c

[PATCH v2 10/10] timegm: add portable implementation (Solaris support)

2012-11-05 Thread Blake Jones
The timegm(3) function is a non-standard extension to libc which is available in GNU libc and on some BSDs. Although SunOS had this function in its libc, Solaris (unfortunately) removed it. This patch implements a very simple version of timegm() which is good enough for parse-time-string.c. One

Re: [PATCH v2 05/10] install: check for non-SysV version (Solaris support)

2012-11-07 Thread Blake Jones
diff --git a/vim/Makefile b/vim/Makefile index f17bebf..7ceba7a 100644 --- a/vim/Makefile +++ b/vim/Makefile @@ -5,8 +5,6 @@ files = plugin/notmuch.vim \ prefix = $(HOME)/.vim destdir = $(prefix)/plugin -INSTALL = install -D -m644 - all: help help: @@ -17,7

Re: [PATCH v2 07/10] gen-version-script: parse Solaris nm output (Solaris support)

2012-11-07 Thread Blake Jones
@@ -11,10 +12,44 @@ fi HEADER=$1 shift +if [ `uname -s` == SunOS ] ; then +# +# Using Solaris nm, a defined symbol looks like this: +# The POSIX / Bourne -comformant equality comparison is '='. Sigh, of course it is. Fixed. e.g. $ ./heirloom-sh/sh -c ' [ a == b ]

Re: [PATCH v2 07/10] gen-version-script: parse Solaris nm output (Solaris support)

2012-11-08 Thread Blake Jones
Would a respun version of these patches help toward testing? $ grep vim test/* zsh: exit 1 grep vim test/* i.e. no vim tests... Sure -- I was referring to any more general testing you might do. Anyway, thanks for your comments. Barring any more comments I'll probably send out an

[PATCH v3 00/10] Solaris support

2012-11-13 Thread Blake Jones
Updated based on comments from Tomi Ollila last week: - Cleaned up the $(INSTALL) changes in vim/Makefile. - Fixed gen-version-script to be compliant with old sh implementation. ___ notmuch mailing list notmuch@notmuchmail.org

[PATCH v3 02/10] asctime: check for standards compliance (Solaris support)

2012-11-13 Thread Blake Jones
Add checks to configure to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for asctime_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH v3 01/10] getpwuid: check for standards compliance (Solaris support)

2012-11-13 Thread Blake Jones
Add checks to configure to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for getpwuid_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH v3 04/10] configure: check for -Wl,-rpath (Solaris support)

2012-11-13 Thread Blake Jones
Add a check to configure to see whether -Wl,-rpath can be used without --enable-new-dtags. Solaris needs the former and doesn't know about the latter. --- configure |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 9707f11..c9da667 100755 ---

[PATCH v3 08/10] notmuch-config: use strchr(), not index() (Solaris support)

2012-11-13 Thread Blake Jones
notmuch-config.c has the only use of the function named index() in the notmuch source. Several other places use the equivalent function strchr(); this patch just fixes notmuch-config.c to use strchr() instead. (Solaris needs to include strings.h to get the prototype for index(), and

[PATCH v3 03/10] gethostbyname: check for libnsl (Solaris support)

2012-11-13 Thread Blake Jones
Add a check to configure to see whether -lnsl is needed for programs that are using gethostbyname(). This change also adds the file compat/check_ghbn.c, which configure uses to perform its check. --- compat/check_ghbn.c |9 + configure | 17 - 2 files

[PATCH v3 07/10] gen-version-script: parse Solaris nm output (Solaris support)

2012-11-13 Thread Blake Jones
The output of nm on Solaris is substantially different from that on Linux, and the current version of gen-version-script is tied to the Linux nm output. This patch separates the parts of nm processing which are dependent on the output format into a couple shell functions, and makes another shell

[PATCH v3 05/10] install: check for non-SysV version (Solaris support)

2012-11-13 Thread Blake Jones
Solaris ships a program called install in /usr/sbin, which performs a task that's fairly similar to the GNU and BSD install programs but which uses very different command line arguments. In particular, if it is invoked without -c, -f, or -n, it will search the target directory for a file with the

[PATCH v3 10/10] timegm: add portable implementation (Solaris support)

2012-11-13 Thread Blake Jones
The timegm(3) function is a non-standard extension to libc which is available in GNU libc and on some BSDs. Although SunOS had this function in its libc, Solaris (unfortunately) removed it. This patch implements a very simple version of timegm() which is good enough for parse-time-string.c. One

[PATCH v3 06/10] strsep: check for availability (Solaris support)

2012-11-13 Thread Blake Jones
Solaris does not ship a version of the strsep() function. This change adds a check to configure to see whether notmuch needs to provide its own implementation, and if so, it uses the new version in compat/strsep.c (which was copied from Mutt, and apparently before that from glibc). ---

Re: [PATCH v3 00/10] Solaris support

2012-11-15 Thread Blake Jones
$ gcc compat/have_strsep.c compat/have_strsep.c: In function main: compat/have_strsep.c:7:21: error: expected identifier or ( before const compat/have_strsep.c:9:29: error: delim undeclared (first use in this function) compat/have_strsep.c:9:29: note: each undeclared identifier is reported

Re: crash during saving

2013-04-16 Thread Blake Jones
I just indexed my mail archive by notmuch and I'm starting to play with mutt-kz. The biggest stopper right now is that mutt cores when set already read mail to new (toggle-new in mutt). Once I try to leave the virtual folder (be it to another folder or because of quitting mutt) it crashes.

Re: crash during saving

2013-04-17 Thread Blake Jones
Right, so the problem really seems to be in throwing/catching exception. Function _notmuch_message_remove_term is supposed to catch the exception and ignore it. Which does not happen in my case. Yep, that was exactly what I was seeing. On a side note, I wonder, is catching exception faster

Re: [PATCH 4/4] timegm: add portable implementation (Solaris support)

2013-08-20 Thread Blake Jones
From: Blake Jones bla...@foo.net The timegm(3) function is a non-standard extension to libc which is available in GNU libc and on some BSDs. Although SunOS had this function in its libc, Solaris (unfortunately) removed it. This patch implements a very simple version of timegm() which

[PATCH 09/10] debugger.c: correct return type from getppid() (Solaris support)

2012-11-03 Thread Blake Jones
Cast the return value of getppid() to "int" from "pid_t" in debugger.c, since it is being passed to sprintf("%d"), which wants an "int" argument. On Solaris, "pid_t" is a "long" for 32-bit programs. --- debugger.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugger.c

[PATCH 04/10] configure: check for -Wl,-rpath (Solaris support)

2012-11-03 Thread Blake Jones
Add a check to "configure" to see whether -Wl,-rpath can be used without --enable-new-dtags. Solaris needs the former and doesn't know about the latter. --- configure |4 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 28d4110..5c5139f 100755 --- a/configure

[PATCH 08/10] notmuch-config: header for index() prototype (Solaris support)

2012-11-03 Thread Blake Jones
Linux, FreeBSD, and Solaris all expect to find the prototype for "index()" in . On some operating systems, including is sufficient to get the prototype, but that's not the case on Solaris. This patch just modifies notmuch-config.c to include to get the prototype. --- notmuch-config.c |1 +

[PATCH 03/10] gethostbyname: check for libnsl (Solaris support)

2012-11-03 Thread Blake Jones
Add a check to "configure" to see whether -lnsl is needed for programs that are using gethostbyname(). This change also adds the file "compat/check_ghbn.c", which configure uses to perform its check. --- compat/check_ghbn.c |8 configure | 17 - 2 files

[PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-03 Thread Blake Jones
The timegm(3) function is a non-standard extension to libc which is available in GNU libc and on some BSDs. Although SunOS had this function in its libc, Solaris (unfortunately) removed it. This patch implements a very simple version of timegm() which is good enough for parse-time-string.c.

[PATCH 01/10] getpwuid: check for standards compliance (Solaris support)

2012-11-03 Thread Blake Jones
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for getpwuid_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH 07/10] gen-version-script: parse Solaris "nm" output (Solaris support)

2012-11-03 Thread Blake Jones
The output of "nm" on Solaris is substantially different from that on Linux, and the current version of gen-version-script is tied to the Linux "nm" output. This patch separates the parts of "nm" processing which are dependent on the output format into a couple shell functions, and makes another

[PATCH 02/10] asctime: check for standards compliance (Solaris support)

2012-11-03 Thread Blake Jones
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for asctime_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH 06/10] strsep: check for availability (Solaris support)

2012-11-03 Thread Blake Jones
Solaris does not ship a version of the strsep() function. This change adds a check to "configure" to see whether notmuch needs to provide its own implementation, and if so, it uses the new version in "compat/strsep.c" (which was copied from Mutt, and apparently before that from glibc). ---

[PATCH 05/10] install: check for non-SysV version (Solaris support)

2012-11-03 Thread Blake Jones
Solaris ships a program called "install" in /usr/sbin, which performs a task that's fairly similar to the GNU and BSD "install" programs but which uses very different command line arguments. In particular, if it is invoked without "-c", "-f", or "-n", it will search the target directory for a

[PATCH 00/10] Solaris support

2012-11-03 Thread Blake Jones
Hi all, This patch series fixes several issues which are needed to allow notmuch to build on Solaris 11. I've been "testing" it for a month or so by using Karel Zak's fork of mutt along with a copy of notmuch-0.13.2 that I got to compile. After a friend asked for a copy of my setup, I decided

[PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-04 Thread Blake Jones
Hi Jani, > I'd prefer to use timegm() where available, and the suggested > alternative [1] elsewhere. > > [1] http://www.kernel.org/doc/man-pages/online/pages/man3/timegm.3.html I considered this alternative, but decided against it because it's completely MT-unsafe. I don't know whether

[PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-04 Thread Blake Jones
> That is a valid point. Yet it doesn't change the fact that I'd prefer > to use timegm() where available. Internally, glibc uses the same code > to implement both timegm() and mktime(), and I'd hate it if the > results were subtly different depending on whether the time zone was > specified in

[PATCH 08/10] notmuch-config: header for index() prototype (Solaris support)

2012-11-04 Thread Blake Jones
>> On Sun, 04 Nov 2012, Blake Jones wrote: >>> Linux, FreeBSD, and Solaris all expect to find the prototype for >>> "index()" in . On some operating systems, including >>> is sufficient to get the prototype, but that's not the case >>> on

[PATCH 05/10] install: check for non-SysV version (Solaris support)

2012-11-04 Thread Blake Jones
> > +INSTALL="install" > > +printf "Checking for working \"install\" program... " > > +mkdir _tmp_ > > This doesn't feel like a hot idea. Out of curiosity, why not? An "install" that behaves as expected is one of the first things that an autoconf-generated "configure" looks for. Now,

[PATCH 05/10] install: check for non-SysV version (Solaris support)

2012-11-05 Thread Blake Jones
> On Mon, 05 Nov 2012, Blake Jones wrote: > >> > +INSTALL="install" > >> > +printf "Checking for working \"install\" program... " > >> > +mkdir _tmp_ > >> > >> This doesn't feel like a hot idea. > >

[PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-05 Thread Blake Jones
> Yet another idea for an alternative. Compile by entering 'sh xtimegm.c' > and then run ./xtimegm > > Simple cases seems to work. Dst change may (or then may not) give one > hour difference to the expected. The test "coverage" could be easily > expanded to that ;) > > Hmm, I also found this: >

[PATCH 10/10] timegm: add portable implementation (Solaris support)

2012-11-05 Thread Blake Jones
>> The other approaches rely on letting libc do all the hard work of >> time zone manipulation, and then reading the tea leaves to find a way >> to undo it. > > Did you look at the gnu libc version -- I bet it is pretty hairy... I didn't look at either the GNU or the Solaris libc version. But

[PATCH 00/10] Solaris support

2012-11-05 Thread Blake Jones
> Just now I don't have more time to comment and review more, but in the > first 2/3 patches when I tried to compile I got problem NULL not > defined. Oh! Yes, I should include to pull in the definition of NULL. I'll fix that. > Another thing: you have this > > +# Whether the asctime_r

[PATCH v2 00/10] Solaris support

2012-11-05 Thread Blake Jones
Thanks to Jani Nikula and Tomi Ollila for their comments. Changes since last version: - Add feature test for timegm(); move portable implementation of timegm() into compat/, change libparse-time-string to pull in .o's from compat/. - Include in compat/check_*.c, to get definition of NULL.

[PATCH v2 01/10] getpwuid: check for standards compliance (Solaris support)

2012-11-05 Thread Blake Jones
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for getpwuid_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH v2 02/10] asctime: check for standards compliance (Solaris support)

2012-11-05 Thread Blake Jones
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for asctime_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH v2 03/10] gethostbyname: check for libnsl (Solaris support)

2012-11-05 Thread Blake Jones
Add a check to "configure" to see whether -lnsl is needed for programs that are using gethostbyname(). This change also adds the file "compat/check_ghbn.c", which configure uses to perform its check. --- compat/check_ghbn.c |9 + configure | 17 - 2 files

[PATCH v2 04/10] configure: check for -Wl,-rpath (Solaris support)

2012-11-05 Thread Blake Jones
Add a check to "configure" to see whether -Wl,-rpath can be used without --enable-new-dtags. Solaris needs the former and doesn't know about the latter. --- configure |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 9707f11..c9da667 100755

[PATCH v2 06/10] strsep: check for availability (Solaris support)

2012-11-05 Thread Blake Jones
Solaris does not ship a version of the strsep() function. This change adds a check to "configure" to see whether notmuch needs to provide its own implementation, and if so, it uses the new version in "compat/strsep.c" (which was copied from Mutt, and apparently before that from glibc). ---

[PATCH v2 05/10] install: check for non-SysV version (Solaris support)

2012-11-05 Thread Blake Jones
Solaris ships a program called "install" in /usr/sbin, which performs a task that's fairly similar to the GNU and BSD "install" programs but which uses very different command line arguments. In particular, if it is invoked without "-c", "-f", or "-n", it will search the target directory for a

[PATCH v2 08/10] notmuch-config: use strchr(), not index() (Solaris support)

2012-11-05 Thread Blake Jones
notmuch-config.c has the only use of the function named "index()" in the notmuch source. Several other places use the equivalent function "strchr()"; this patch just fixes notmuch-config.c to use strchr() instead. (Solaris needs to include to get the prototype for index(), and notmuch-config.c

[PATCH v2 07/10] gen-version-script: parse Solaris "nm" output (Solaris support)

2012-11-05 Thread Blake Jones
The output of "nm" on Solaris is substantially different from that on Linux, and the current version of gen-version-script is tied to the Linux "nm" output. This patch separates the parts of "nm" processing which are dependent on the output format into a couple shell functions, and makes another

[PATCH v2 09/10] debugger.c: correct return type from getppid() (Solaris support)

2012-11-05 Thread Blake Jones
Cast the return value of getppid() to "int" from "pid_t" in debugger.c, since it is being passed to sprintf("%d"), which wants an "int" argument. On Solaris, "pid_t" is a "long" for 32-bit programs. --- debugger.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH v2 10/10] timegm: add portable implementation (Solaris support)

2012-11-05 Thread Blake Jones
The timegm(3) function is a non-standard extension to libc which is available in GNU libc and on some BSDs. Although SunOS had this function in its libc, Solaris (unfortunately) removed it. This patch implements a very simple version of timegm() which is good enough for parse-time-string.c. One

[PATCH v2 05/10] install: check for non-SysV version (Solaris support)

2012-11-07 Thread Blake Jones
> > diff --git a/vim/Makefile b/vim/Makefile > > index f17bebf..7ceba7a 100644 > > --- a/vim/Makefile > > +++ b/vim/Makefile > > @@ -5,8 +5,6 @@ files = plugin/notmuch.vim \ > > prefix = $(HOME)/.vim > > destdir = $(prefix)/plugin > > > > -INSTALL = install -D -m644 > > - > > all: help > >

[PATCH v2 07/10] gen-version-script: parse Solaris "nm" output (Solaris support)

2012-11-07 Thread Blake Jones
>> @@ -11,10 +12,44 @@ fi >> HEADER=$1 >> shift >> >> +if [ `uname -s` == SunOS ] ; then >> +# >> +# Using Solaris "nm", a defined symbol looks like this: >> +# > > The POSIX / Bourne -comformant equality comparison is '='. Sigh, of course it is. Fixed. > e.g. > > $

[PATCH v2 07/10] gen-version-script: parse Solaris "nm" output (Solaris support)

2012-11-08 Thread Blake Jones
>> Would a respun version of these patches help toward testing? > > $ grep vim test/* > zsh: exit 1 grep vim test/* > > i.e. no vim tests... Sure -- I was referring to any more general testing you might do. Anyway, thanks for your comments. Barring any more comments I'll probably send out

[PATCH v3 00/10] Solaris support

2012-11-13 Thread Blake Jones
Updated based on comments from Tomi Ollila last week: - Cleaned up the $(INSTALL) changes in vim/Makefile. - Fixed gen-version-script to be compliant with old "sh" implementation.

[PATCH v3 02/10] asctime: check for standards compliance (Solaris support)

2012-11-13 Thread Blake Jones
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for asctime_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH v3 01/10] getpwuid: check for standards compliance (Solaris support)

2012-11-13 Thread Blake Jones
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs to be defined to get the right number of arguments in the prototypes for getpwuid_r(). Solaris' default implementation conforms to POSIX.1c Draft 6, rather than the final POSIX.1c spec. The standards-compliant version can be

[PATCH v3 04/10] configure: check for -Wl,-rpath (Solaris support)

2012-11-13 Thread Blake Jones
Add a check to "configure" to see whether -Wl,-rpath can be used without --enable-new-dtags. Solaris needs the former and doesn't know about the latter. --- configure |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 9707f11..c9da667 100755

[PATCH v3 08/10] notmuch-config: use strchr(), not index() (Solaris support)

2012-11-13 Thread Blake Jones
notmuch-config.c has the only use of the function named "index()" in the notmuch source. Several other places use the equivalent function "strchr()"; this patch just fixes notmuch-config.c to use strchr() instead. (Solaris needs to include to get the prototype for index(), and notmuch-config.c

[PATCH v3 10/10] timegm: add portable implementation (Solaris support)

2012-11-13 Thread Blake Jones
The timegm(3) function is a non-standard extension to libc which is available in GNU libc and on some BSDs. Although SunOS had this function in its libc, Solaris (unfortunately) removed it. This patch implements a very simple version of timegm() which is good enough for parse-time-string.c. One

[PATCH v3 03/10] gethostbyname: check for libnsl (Solaris support)

2012-11-13 Thread Blake Jones
Add a check to "configure" to see whether -lnsl is needed for programs that are using gethostbyname(). This change also adds the file "compat/check_ghbn.c", which configure uses to perform its check. --- compat/check_ghbn.c |9 + configure | 17 - 2 files

[PATCH v3 07/10] gen-version-script: parse Solaris "nm" output (Solaris support)

2012-11-13 Thread Blake Jones
The output of "nm" on Solaris is substantially different from that on Linux, and the current version of gen-version-script is tied to the Linux "nm" output. This patch separates the parts of "nm" processing which are dependent on the output format into a couple shell functions, and makes another

[PATCH v3 05/10] install: check for non-SysV version (Solaris support)

2012-11-13 Thread Blake Jones
Solaris ships a program called "install" in /usr/sbin, which performs a task that's fairly similar to the GNU and BSD "install" programs but which uses very different command line arguments. In particular, if it is invoked without "-c", "-f", or "-n", it will search the target directory for a

[PATCH v3 09/10] debugger.c: correct return type from getppid() (Solaris support)

2012-11-13 Thread Blake Jones
Cast the return value of getppid() to "int" from "pid_t" in debugger.c, since it is being passed to sprintf("%d"), which wants an "int" argument. On Solaris, "pid_t" is a "long" for 32-bit programs. --- debugger.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH v3 06/10] strsep: check for availability (Solaris support)

2012-11-13 Thread Blake Jones
Solaris does not ship a version of the strsep() function. This change adds a check to "configure" to see whether notmuch needs to provide its own implementation, and if so, it uses the new version in "compat/strsep.c" (which was copied from Mutt, and apparently before that from glibc). ---

[PATCH v3 00/10] Solaris support

2012-11-15 Thread Blake Jones
> $ gcc compat/have_strsep.c > compat/have_strsep.c: In function "main": > compat/have_strsep.c:7:21: error: expected identifier or "(" before "const" > compat/have_strsep.c:9:29: error: "delim" undeclared (first use in this > function) > compat/have_strsep.c:9:29: note: each undeclared

crash during saving

2013-04-16 Thread Blake Jones
> I just indexed my mail archive by notmuch and I'm starting to play > with mutt-kz. The biggest stopper right now is that mutt cores when > set already read mail to new (toggle-new in mutt). Once I try to leave > the virtual folder (be it to another folder or because of quitting > mutt) it

crash during saving

2013-04-17 Thread Blake Jones
> Right, so the problem really seems to be in throwing/catching > exception. Function "_notmuch_message_remove_term" is supposed to > catch the exception and ignore it. Which does not happen in my case. Yep, that was exactly what I was seeing. > On a side note, I wonder, is catching exception

[PATCH 4/4] timegm: add portable implementation (Solaris support)

2013-08-20 Thread Blake Jones
> From: Blake Jones > > The timegm(3) function is a non-standard extension to libc which is > available in GNU libc and on some BSDs. Although SunOS had this > function in its libc, Solaris (unfortunately) removed it. This patch > implements a very simple version of time

[PATCH 4/4] timegm: add portable implementation (Solaris support)

2013-08-20 Thread Blake Jones
> The copyright header gives FSF "owner"ship to the file -- which would > be fine by the project -- but does assigning copyright to the FSF work > like this... ... I started to look around and found (among other > pages) this: > >