This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tzset claimed to be ANSI not POSIX in fix-header.c

Jonathan Larmour wrote:
gcc/fix-header.c incorrectly defines tzset() to be an ANSI symbol when in fact it is POSIX.1. I am developing on a system where a system header gets "fixed" to define tzset(), when tzset() doesn't in fact exist in this system. The attached patch, against GCC 3.3.2 fixes this (I have bootstrap problems with GCC 3.3.3 on target arm-elf). As well as the GCC 3.3 branch it should also be applied to the trunk.

2004-03-10 Jonathan Larmour <>

* fix-header.c: tzset() is POSIX not ANSI.

Sorry for not noticing, but tzset isn't the only function in this category. putenv() and kill() are also POSIX, not ANSI. Therefore please instead use the attached page and ChangeLog entry. Thanks!

2004-03-10 Jonathan Larmour <>

* fix-header.c: kill(), putenv() and tzset() are POSIX not ANSI.

Jifl -- eCosCentric The eCos and RedBoot experts >>>>> Visit us in booth 2527 at the Embedded Systems Conference 2004 <<<<< March 30 - April 1, San Francisco --["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine
Index: fix-header.c
RCS file: /cvs/gcc/gcc/gcc/fix-header.c,v
retrieving revision 1.84
diff -u -5 -p -r1.84 fix-header.c
--- fix-header.c	12 Aug 2002 22:44:30 -0000	1.84
+++ fix-header.c	11 Mar 2004 07:00:45 -0000
@@ -267,11 +267,12 @@ tan\0tanh\0" },
   /* Left out signal() - its prototype is too complex for us!
      Also left out "sigaction sigaddset sigdelset sigemptyset
      sigfillset sigismember sigpending sigprocmask sigsuspend"
      because these need sigset_t or struct sigaction.
      Most systems that provide them will also declare them.  */
-  { "signal.h", ANSI_SYMBOL, "kill\0raise\0" },
+  { "signal.h", ANSI_SYMBOL, "raise\0" },
+  { CONTINUED, POSIX1_SYMBOL, "kill\0" },
   { "stdio.h", ANSI_SYMBOL,
@@ -286,13 +287,14 @@ tmpnam\0ungetc\0" },
      ignore these: "mblen mbstowcs mbstowc wcstombs wctomb"
      Left out getgroups, because SunOS4 has incompatible BSD and SVR4 versions.
      Should perhaps also add NULL */
   { "stdlib.h", ANSI_SYMBOL,
 srand\0strtod\0strtol\0strtoul\0system\0" },
+  { CONTINUED, POSIX1_SYMBOL, "putenv\0" },
   { "string.h", ANSI_SYMBOL, "memchr\0memcmp\0memcpy\0memmove\0memset\0\
 strtok\0strxfrm\0" },
@@ -337,11 +339,12 @@ WTERMSIG\0WNOHANG\0WNOTRACED\0" },
   { "termios.h", POSIX1_SYMBOL,
       "cfgetispeed\0cfgetospeed\0cfsetispeed\0cfsetospeed\0tcdrain\0tcflow\0tcflush\0tcgetattr\0tcsendbreak\0tcsetattr\0" },
   { "time.h", ANSI_SYMBOL,
-      "asctime\0clock\0ctime\0difftime\0gmtime\0localtime\0mktime\0strftime\0time\0tzset\0" },
+      "asctime\0clock\0ctime\0difftime\0gmtime\0localtime\0mktime\0strftime\0time\0" },
+  { CONTINUED, POSIX1_SYMBOL, "tzset\0" },
   { "unistd.h", POSIX1_SYMBOL,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]