Date: Thu, 24 Nov 2011 00:12:23 +0100 (CET) From: Pavel Kankovsky <peak@...o.troja.mff.cuni.cz> To: owl-dev@...ts.openwall.com Subject: Re: glibc' time.h dependency on stdlib.h (was: glibc update) On Mon, 21 Nov 2011, Vasiliy Kulikov wrote: > build@...atros:~ $ gcc -D_GNU_SOURCE -Wall a.c -o a > In file included from a.c:1:0: > /usr/include/time.h:226:5: error: unknown type name '__locale_t' > > A bug in glibc headers dependency? Or time.h really must be included > only after explicit stdlib.h, which was not forced by our old glibc? It is a bug. strftime_l and strftime_l used to be GNU extensions but the latter function was adopted by POSIX 2008. #ifdef __USE_GNU was split into #ifdef __USE_XOPEN2K8 followed by #ifdef __USE_GNU but there is only one #include <xlocale.h> in the first conditional section. See <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=6cbe890a9d379d85fe849a8317010f05ace00809#patch14> It appears __USE_GNU is defined when your test case is compiled but __USE_XOPEN2K8 is not defined. This should never happen. _GNU_SOURCE is supposed to all POSIX features including __USE_XOPEN2K8 (indirectly by #define _POSIX_C_SOURCE 200809L). -- Pavel Kankovsky aka Peak / Jeremiah 9:21 \ "For death is come up into our MS Windows(tm)..." \ 21st century edition /
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.