GNOME Bugzilla – Bug 551835
implicit declarations in libexslt/date.c
Last modified: 2008-09-11 16:20:16 UTC
(actually libxslt-1.1.24, but that version isn't in the pulldown menu) Compiling on OS X 10.4 (gcc 4.0.1), I get: date.c: In function 'exsltDateCurrent': date.c:761: warning: implicit declaration of function 'localtime_r' date.c:779: warning: implicit declaration of function 'gmtime_r' I do have those functions, as correctly detected by configure: checking for gettimeofday... yes checking for mktime... yes checking for localtime... yes checking for localtime_r... yes checking for asctime... yes checking for time... yes checking for gmtime_r... yes checking for ftime... yes but I need (according to manpage) time.h. That header was found during configure: checking time.h usability... yes checking time.h presence... yes checking for time.h... yes The problem is here: #if HAVE_LOCALTIME_R /* _POSIX_SOURCE required by gnu libc */ #ifndef _AIX51 /* but on AIX we're not using gnu libc */ #define _POSIX_SOURCE #endif #endif [...] #ifdef HAVE_MATH_H #include <math.h> #endif My time.h appears to declare the _r functions only if the _POSIX_SOURCE token is not set. What specifically is the need for _POSIX_SOURCE, and can it be tested directly (or else testing specifically for libc) instead of relying on guessing which platform(s) have it?
damn, not sure why I couldn't find Bug #340590, which I had previously summitted on this. *** This bug has been marked as a duplicate of 340590 ***