http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47802
--- Comment #20 from dave at hiauly1 dot hia.nrc.ca 2011-02-23 20:15:34 UTC --- > As there localtime_r is also used in intrinsics/date_and_time.c, I would > assume > that one sees the same message there. Yes. I see them for all _r uses. > I am also not quite sure that _REENTRANT is the correct solution. At least for > Solaris, one should use _POSIX_C_SOURCE and not _REENTRANT to get the POSIX > version, cf. http://download.oracle.com/docs/cd/E19455-01/806-5257/compile-4/ I looked at the headers. On HP-UX 11, _REENTRANT is defined by <sys/stdsyms.h> if _POSIX_C_SOURCE is defined and _REENTRANT is not defined. However, this does not occur on HP-UX 10. The system headers never define _REENTRANT. The default _HPUX_SOURCE is equivalent to -D_POSIX_C_SOURCE=199506L on HP-UX 11. Defining _REENTRANT also includes the same POSIX sources. The PA backend defines _REENTRANT if -threads is specified on HP-UX 10 and if -pthread is specified on HP-UX 11. -threads also defines _DCE_THREADS which we may not want for the single thread model. libgfortran.sl is built twice on HP-UX 10, once for the single thread model and once for the dce thread model. It's the single thread build that's the problem. > For HP-UX, I could not find anything (cf. also > http://docs.hp.com/en/B2355-90683/ctime.3C.html). However, IBM has a statement > regarding HP-UX, which is similar to Solaris's above: > http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb.doc/ad/t0007651.htm All the reentrant functions are in libc. Dave