[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils 5.1.0 compile failure on Tru64 5.1b
From: |
Tim Mooney |
Subject: |
Re: coreutils 5.1.0 compile failure on Tru64 5.1b |
Date: |
Thu, 22 Jan 2004 10:20:55 -0600 (CST) |
In regard to: Re: coreutils 5.1.0 compile failure on Tru64 5.1b, Paul...:
>Tim Mooney <address@hidden> writes:
>
>> cc: Error: fts.c, line 196: Missing ";". (nosemi)
>> return (uintmax_t) ax->ino % table_size;
>
>Thanks for reporting that. Does this patch fix things for you?
It doesn't, but only because the #if is in an #else. Since Tru64
has inttypes.h too, it's included and the HAVE_STDINT_H is never tested
and <stdint.h> is never included. I've discovered that several other
files in the lib directory use the contstruct you proposed (prefer
inttypes.h to stdint.h, and only include one or the other) or one very
similar, and those files cause the same problems on Tru64.
Are there platforms where including both inttypes.h and stdint.h, if both
are available, cause a clash?
The patch below works on Tru64, and doesn't seem to cause any problems
on Solaris 8 or IRIX 6.5.20. Since the code appears to be intentional
about not including both inttypes.h and stdint.h, I'm hesitant about
whether this is the right approach. It basically just changes all
instances so that it's not an "either, or" inclusion -- both files will
be included if both are present.
diff -ur coreutils-5.1.0.orig/lib/fsusage.c coreutils-5.1.0/lib/fsusage.c
--- coreutils-5.1.0.orig/lib/fsusage.c 2003-06-06 14:46:20.000000000 -0500
+++ coreutils-5.1.0/lib/fsusage.c 2004-01-22 09:55:05.000000000 -0600
@@ -23,10 +23,9 @@
#if HAVE_INTTYPES_H
# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
+#endif
+#if HAVE_STDINT_H
+# include <stdint.h>
#endif
#ifndef UINTMAX_MAX
# define UINTMAX_MAX ((uintmax_t) -1)
diff -ur coreutils-5.1.0.orig/lib/fts.c coreutils-5.1.0/lib/fts.c
--- coreutils-5.1.0.orig/lib/fts.c 2003-12-20 12:05:23.000000000 -0600
+++ coreutils-5.1.0/lib/fts.c 2004-01-22 09:43:08.000000000 -0600
@@ -54,6 +54,9 @@
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
#if defined _LIBC
# include <dirent.h>
diff -ur coreutils-5.1.0.orig/lib/human.h coreutils-5.1.0/lib/human.h
--- coreutils-5.1.0.orig/lib/human.h 2003-06-05 02:14:53.000000000 -0500
+++ coreutils-5.1.0/lib/human.h 2004-01-22 09:51:51.000000000 -0600
@@ -31,10 +31,9 @@
# if HAVE_INTTYPES_H
# include <inttypes.h>
-# else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
+# endif
+# if HAVE_STDINT_H
+# include <stdint.h>
# endif
/* A conservative bound on the maximum length of a human-readable string.
diff -ur coreutils-5.1.0.orig/lib/inttostr.h coreutils-5.1.0/lib/inttostr.h
--- coreutils-5.1.0.orig/lib/inttostr.h 2003-06-18 05:19:14.000000000 -0500
+++ coreutils-5.1.0/lib/inttostr.h 2004-01-22 09:52:30.000000000 -0600
@@ -26,6 +26,10 @@
# include <inttypes.h>
#endif
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
#if HAVE_LIMITS_H
# include <limits.h>
#endif
diff -ur coreutils-5.1.0.orig/lib/strtoimax.c coreutils-5.1.0/lib/strtoimax.c
--- coreutils-5.1.0.orig/lib/strtoimax.c 2003-09-13 07:06:33.000000000
-0500
+++ coreutils-5.1.0/lib/strtoimax.c 2004-01-22 09:56:03.000000000 -0600
@@ -23,7 +23,8 @@
#if HAVE_INTTYPES_H
# include <inttypes.h>
-#elif HAVE_STDINT_H
+#endif
+#if HAVE_STDINT_H
# include <stdint.h>
#endif
diff -ur coreutils-5.1.0.orig/lib/xstrtol.h coreutils-5.1.0/lib/xstrtol.h
--- coreutils-5.1.0.orig/lib/xstrtol.h 2003-10-15 02:18:41.000000000 -0500
+++ coreutils-5.1.0/lib/xstrtol.h 2004-01-22 09:53:07.000000000 -0600
@@ -23,10 +23,9 @@
/* Get uintmax_t. */
# if HAVE_INTTYPES_H
# include <inttypes.h>
-# else
-# if HAVE_STDINT_H
+# endif
+# if HAVE_STDINT_H
# include <stdint.h>
-# endif
# endif
# ifndef _STRTOL_ERROR
Tim
--
Tim Mooney address@hidden
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164