]> Savannah Git Hosting - gnulib.git/commitdiff
intprops: port to OpenVMS
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 25 Aug 2016 03:48:32 +0000 (20:48 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 25 Aug 2016 03:52:10 +0000 (20:52 -0700)
Problem reported by John E. Malmberg in: https://bugs.gnu.org/24300
* doc/posix-headers/limits.texi: Document the problem.
* lib/intprops.h (LLONG_MAX, LLONG_MIN) [__INT64_MAX]:
Define if not already defined.

ChangeLog
doc/posix-headers/limits.texi
lib/intprops.h

index e842a3340c505ee21bb470ebaf6798fbbc392095..7cfd2444a88a529e7189d1c066b109149830918c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-08-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       intprops: port to OpenVMS
+       Problem reported by John E. Malmberg in: https://bugs.gnu.org/24300
+       * doc/posix-headers/limits.texi: Document the problem.
+       * lib/intprops.h (LLONG_MAX, LLONG_MIN) [__INT64_MAX]:
+       Define if not already defined.
+
 2016-08-19  Assaf Gordon  <assafgordon@gmail.com>
 
        parse-datetime: improve debug implementation
index 9f4ffa58238727136fbb63f9b095918db9249531..31207ac8073d935206d4d3d7f1b2a27f4b389ff4 100644 (file)
@@ -18,7 +18,7 @@ Portability problems not fixed by Gnulib:
 @item
 The macros @code{LLONG_MIN}, @code{LLONG_MAX}, @code{ULLONG_MAX} are not
 defined on some platforms:
-AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1 with gcc.
+AIX 5.1, HP-UX 11, IRIX 6.5, OpenVMS, OSF/1 5.1 with gcc.
 @item
 The macros @code{WORD_BIT}, @code{LONG_BIT} are not defined on some platforms:
 glibc 2.11 without @code{-D_GNU_SOURCE}, Cygwin, mingw, MSVC 9.
index feb02c3c609f3696125d2d568d602e0516d376ee..fe6c789825130cc0527a1713e3cc43952bb9c008 100644 (file)
 #define _GL_SIGNED_INT_MAXIMUM(e)                                       \
   (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
 
+/* Work around OpenVMS incompatibility with C99.  */
+#if !defined LLONG_MAX && defined __INT64_MAX
+# define LLONG_MAX __INT64_MAX
+# define LLONG_MIN __INT64_MIN
+#endif
+
 /* This include file assumes that signed types are two's complement without
    padding bits; the above macros have undefined behavior otherwise.
    If this is a problem for you, please let us know how to fix it for your host.