After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 551835 - implicit declarations in libexslt/date.c
implicit declarations in libexslt/date.c
Status: RESOLVED DUPLICATE of bug 340590
Product: libxslt
Classification: Platform
Component: general
1.1.x
Other Mac OS
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-11 16:18 UTC by Daniel Macks
Modified: 2008-09-11 16:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Macks 2008-09-11 16:18:15 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?
Comment 1 Daniel Macks 2008-09-11 16:20:16 UTC
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 ***