--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > --- [EMAIL PROTECTED] wrote: > > > The comment probably should read: "Needed to enable pthread > > > recursive mutexes *on Linux*". > > > > Or more specifically, on old versions of Linux/GNU LIBC. > > > > Have you seen any recent Linux distros that need this macro defined? > > If so, maybe you could define it only for those specific distros, > > since defining it can be troublesome on other platforms. > > I'm running SuSE 10.1. It isn't that old.
I was wrong. My recent linux distro also requires defining _XOPEN_SOURCE to 500 to pick up PTHREAD_MUTEX_RECURSIVE -- unless _GNU_SOURCE is defined. This could be an alternative to avoid defining _XOPEN_SOURCE: -#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && SQLITE_THREADSAFE -# define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */ +#if defined(linux) && !defined(_GNU_SOURCE) && \ + !defined(_XOPEN_SOURCE) && SQLITE_THREADSAFE +# define _GNU_SOURCE #endif Perhaps configure should decide if defining _XOPEN_SOURCE or _GNU_SOURCE is actually required on a platform. ____________________________________________________________________________________ Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.yahoo.com/r/hs ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------