bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: findutils-4.2.10 on HP-UX 11 (PA-RISC and Itanium-2)


From: James Youngman
Subject: Re: findutils-4.2.10 on HP-UX 11 (PA-RISC and Itanium-2)
Date: Sun, 19 Dec 2004 12:44:39 +0000
User-agent: Mutt/1.3.28i

On Sat, Dec 18, 2004 at 05:27:46PM -0700, Nelson H. F. Beebe wrote:
> After making the change in the configure script for findutils-4.2.10
> on HP-UX 11 (PA-RISC and Itanium-2) to change mnttab.h to mntent.h, I
> forced a build to completion like this:
> 
>         cc -DHAVE_CONFIG_H -I. -I. -I../..      -g -c human.c
> "/usr/include/inttypes.h", line 131: warning #2047-D: incompatible
>           redefinition of macro "UINTMAX_MAX" (declared at line 32 of
>           "human.c")
>   #define UINTMAX_MAX UINT64_MAX                


Does this patch solve the problem?


Index: human.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/human.c,v
retrieving revision 1.27
diff -u -r1.27 human.c
--- human.c     5 Dec 2004 06:50:15 -0000       1.27
+++ human.c     19 Dec 2004 12:37:47 -0000
@@ -25,13 +25,6 @@

 #include "human.h"

-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-#ifndef UINTMAX_MAX
-# define UINTMAX_MAX ((uintmax_t) -1)
-#endif
-
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -44,6 +37,18 @@
 #include <error.h>
 #include <xstrtol.h>

+/* <xstrtol.h> #includes <inttypes.h> if it is present, so to avoid
+ * compilation errors (e.g. on HPUX), we #define UINTMAX_MAX here,
+ * rather than before #including stxtrtol.h.
+ */
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+#ifndef UINTMAX_MAX
+# define UINTMAX_MAX ((uintmax_t) -1)
+#endif
+
+
 /* The maximum length of a suffix like "KiB".  */
 #define HUMAN_READABLE_SUFFIX_LENGTH_MAX 3







reply via email to

[Prev in Thread] Current Thread [Next in Thread]