tzcode standard C patch

Torsten Duwe duwe at
Tue Jul 25 12:34:13 UTC 2000

Dear Mr. Olson (hope "tz" is a synonym, not a list :-) ,

     attached you find the patch we at Caldera are using for quite a while
now to compile the tzcode under Linux, namely with the GNU C library, version
2 and up. I strongly believe the old code compiles on other, "tradidional"
Unix-like systems (if it does so at all without changes) because of their
excessive backward compatibility, that the GNU C library intentionally has
not. My manuals (GNU C library and NetBSD C Library) state that
strerror/perror/<errno.h> comply to

ANSI X3.159-1989 (``ANSI C'')

I have carefully made the changes only to the "#ifdef unix" case, but I think
it is applicable in general.

Thank you for your attention,

      Torsten Duwe

--- zic.c~	Thu May 28 15:56:07 1998
+++ zic.c	Mon Oct 12 17:04:02 1998
@@ -9,6 +9,7 @@
 #include "tzfile.h"
 #ifdef unix
 #include "sys/stat.h"			/* for umask manifest constants */
+#include <errno.h>
 #endif /* defined unix */
@@ -377,7 +378,9 @@
 int	errnum;
+#ifndef unix
 	extern char *	sys_errlist[];
 	extern int	sys_nerr;
 	return (errnum > 0 && errnum <= sys_nerr) ?

More information about the tz mailing list