[notmuch] [PATCH] Mac OS X compatibility fixes

2009-11-23 Thread Jeffrey C. Ollie
Here's a patch that adds private implementations of strndup and getline. They are unconditionally compiled so that compiler errors in these functions can be detected on any platform, even those that provide strndup and getline in the standard library. I'll have a patch that handles the

[notmuch] [PATCH] Mac OS X compatibility fixes

2009-11-23 Thread Carl Worth
On Sun, 22 Nov 2009 12:31:53 +0800, Jjgod Jiang wrote: > On Sun, Nov 22, 2009 at 12:17 PM, Alexander Botero-Lowry > > The problem is that notmuch does not have a fully functional configure > process yet, Carl did mention Makefile.local, but it seems this file is > not generated by configure

[notmuch] [PATCH] Mac OS X compatibility fixes

2009-11-22 Thread Jjgod Jiang
Hi Alex, On Sun, Nov 22, 2009 at 12:17 PM, Alexander Botero-Lowry wrote: >> +#ifdef __APPLE__ > Not awesome. > > This should be done in a capabilites way, for example strndup was added > to FreeBSD in 7.2 (which is this current release of the 7 line), and so > for older versions of FreeBSD

[notmuch] [PATCH] Mac OS X compatibility fixes

2009-11-22 Thread Jjgod Jiang
Add missing GNU extensions strdup() and getline(). The C library shipped with Mac OS X does not include them (though it does support some GNU extensions when _GNU_SOURCE is defined), so we have to add these two. The getline() implementation is a modified version of getdelim() from GNU Libc. ---

[notmuch] [PATCH] Mac OS X compatibility fixes

2009-11-21 Thread Alexander Botero-Lowry
On Sun, 22 Nov 2009 11:07:36 +0800, Jjgod Jiang wrote: > Add missing GNU extensions strdup() and getline(). The C library > shipped with Mac OS X does not include them (though it does support > some GNU extensions when _GNU_SOURCE is defined), so we have to > add these two. The getline()