Re: zic.c compilation on OSF Tru64 Works with -std0 option
Paul Eggert wrote:
Date: Tue, 17 Apr 2001 23:55:34 +0200 From: francois reygagne <freygagne@opteway.com>
cc: Error: zic.c, line 415: In the definition of the function "error", the promoted type of string is incompatible with the type of the corresponding parameter in a prior declaration. (promotmatch)
It sounds like your compiler is broken. You might try using GCC instead; it should work. Or you can try compiling with __STDC__ disabled; there may be an option to tell your compiler to compile in "K&R mode", where __STDC__ is not defined.
I just set into the Makefile of tzcode CFLAGS as bellow using cc compiler on OSF Tru64 and it works. I just recall you I'm working on OSF1 V5.0 1094 alpha : #FOR TRU64 It works CFLAGS= -std0 #FOR TRU64 use cc cc= cc Could you upgrade your Makefile to take into account this update needed to complete successfully the tzcode binary generation for tyhe compaq OSF Tru64. -- François REYGAGNE. Software Architect. opt[e]way S.A., 2881 route des Crêtes, BP308 06906 Sophia Antipolis Cedex, FRANCE tél: +33 (0)4 92 95 27 01 http://www.opteway.com
Date: Wed, 18 Apr 2001 15:09:32 +0200 From: francois reygagne <freygagne@opteway.com>
Could you upgrade your Makefile to take into account this update needed to complete successfully the tzcode binary generation for tyhe compaq OSF Tru64.
How about using the following patch instead? It's a bit more generic. It should address both the C compiler bug with 'const' that you ran into with OSF1 cc, and the other problem that you mentioned with mkdir on HP-UX. =================================================================== RCS file: RCS/Makefile,v retrieving revision 2001.2 diff -pu -r2001.2 Makefile --- Makefile 2001/04/05 20:43:41 2001.2 +++ Makefile 2001/04/20 02:12:55 @@ -86,6 +86,7 @@ YEARISTYPE= ./yearistype LDLIBS= # Add the following to the end of the "CFLAGS=" line as needed. +# -Dconst= if `const' does not work (SunOS 4.x cc, OSF1 V5.0 cc) # -DHAVE_ADJTIME=0 if `adjtime' does not exist (SVR0?) # -DHAVE_GETTEXT=1 if `gettext' works (GNU, Linux, Solaris); also see LDLIBS # -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares @@ -97,6 +98,7 @@ LDLIBS= # -DHAVE_SETTIMEOFDAY=3 if settimeofday ignores 2nd arg (4.4BSD) # -DHAVE_STRERROR=0 if your system lacks the strerror function # -DHAVE_SYMLINK=0 if your system lacks the symlink function +# -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h" # -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h" # -DLOCALE_HOME=\"path\" if locales are in "path", not "/usr/lib/locale" # -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?) =================================================================== RCS file: RCS/private.h,v retrieving revision 2000.5 diff -pu -r2000.5 private.h --- private.h 2000/07/31 13:27:54 2000.5 +++ private.h 2001/04/19 17:30:33 @@ -54,6 +54,10 @@ static char privatehid[] = "@(#)private. #define HAVE_SYMLINK 1 #endif /* !defined HAVE_SYMLINK */ +#ifndef HAVE_SYS_STAT_H +#define HAVE_SYS_STAT_H 1 +#endif /* !defined HAVE_SYS_STAT_H */ + #ifndef HAVE_SYS_WAIT_H #define HAVE_SYS_WAIT_H 1 #endif /* !defined HAVE_SYS_WAIT_H */ @@ -123,16 +127,6 @@ static char privatehid[] = "@(#)private. */ /* -** SunOS 4.1.1 cc lacks const. -*/ - -#ifndef const -#ifndef __STDC__ -#define const -#endif /* !defined __STDC__ */ -#endif /* !defined const */ - -/* ** SunOS 4.1.1 cc lacks prototypes. */ =================================================================== RCS file: RCS/zic.c,v retrieving revision 2000.6 diff -pu -r2000.6 zic.c --- zic.c 2000/08/10 13:31:47 2000.6 +++ zic.c 2001/04/19 17:15:47 @@ -7,9 +7,15 @@ static char elsieid[] = "@(#)zic.c 7.101 #include "private.h" #include "locale.h" #include "tzfile.h" -#ifdef unix -#include "sys/stat.h" /* for umask manifest constants */ -#endif /* defined unix */ + +#if HAVE_SYS_STAT_H +#include "sys/stat.h" +#endif +#ifdef S_IRUSR +#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) +#else +#define MKDIR_UMASK 0755 +#endif /* ** On some ancient hosts, predicates like `isspace(C)' are defined @@ -2187,7 +2193,7 @@ char * const argname; ** created by some other multiprocessor, so we get ** to do extra checking. */ - if (mkdir(name, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) != 0) { + if (mkdir(name, MKDIR_UMASK) != 0) { const char *e = strerror(errno); if (errno != EEXIST || !itsdir(name)) {
participants (2)
-
francois reygagne -
Paul Eggert