bug-gnulib
[Top][All Lists]
Advanced

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

Re: Error compiling strtoimax.c on hppa2.0w-hp-hpux11.11


From: Paul Eggert
Subject: Re: Error compiling strtoimax.c on hppa2.0w-hp-hpux11.11
Date: Tue, 08 Oct 2013 23:29:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

Thanks, I pushed the following, which I hope fixes the problem
in a slightly-more-general way.

>From d619b91857d24f9b9cf97556150e7fa0021347ef Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Tue, 8 Oct 2013 23:27:49 -0700
Subject: [PATCH] strtoimax: port to HP-UX 11.11

Problem reported by Daniel Richard G.
* lib/strtoimax.c (Strtoimax, Strtol, Strtoll): New macros.
(strtoimax, strtol, strtoll) [UNSIGNED]: Remove, since
they might clash with inttypes.h.
---
 ChangeLog       |  8 ++++++++
 lib/strtoimax.c | 15 +++++++++------
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 01dca10..1d3cb6c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-10-08  Paul Eggert  <address@hidden>
+
+       strtoimax: port to HP-UX 11.11
+       Problem reported by Daniel Richard G.
+       * lib/strtoimax.c (Strtoimax, Strtol, Strtoll): New macros.
+       (strtoimax, strtol, strtoll) [UNSIGNED]: Remove, since
+       they might clash with inttypes.h.
+
 2013-10-06  Paul Eggert  <address@hidden>
 
        New module 'count-trailing-zeros'.
diff --git a/lib/strtoimax.c b/lib/strtoimax.c
index c9bd2ad..b4feaf3 100644
--- a/lib/strtoimax.c
+++ b/lib/strtoimax.c
@@ -48,28 +48,31 @@ long long int strtoll (char const *, char **, int);
 #ifdef UNSIGNED
 # define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT
 # define Int uintmax_t
+# define Strtoimax strtoumax
+# define Strtol strtoul
+# define Strtoll strtoull
 # define Unsigned unsigned
-# define strtoimax strtoumax
-# define strtol strtoul
-# define strtoll strtoull
 #else
 # define Have_long_long HAVE_LONG_LONG_INT
 # define Int intmax_t
+# define Strtoimax strtoimax
+# define Strtol strtol
+# define Strtoll strtoll
 # define Unsigned
 #endif
 
 Int
-strtoimax (char const *ptr, char **endptr, int base)
+Strtoimax (char const *ptr, char **endptr, int base)
 {
 #if Have_long_long
   verify (sizeof (Int) == sizeof (Unsigned long int)
           || sizeof (Int) == sizeof (Unsigned long long int));
 
   if (sizeof (Int) != sizeof (Unsigned long int))
-    return strtoll (ptr, endptr, base);
+    return Strtoll (ptr, endptr, base);
 #else
   verify (sizeof (Int) == sizeof (Unsigned long int));
 #endif
 
-  return strtol (ptr, endptr, base);
+  return Strtol (ptr, endptr, base);
 }
-- 
1.8.3.1




reply via email to

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