[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
limits.h test with HP-UX cc
From: |
Bruno Haible |
Subject: |
limits.h test with HP-UX cc |
Date: |
Wed, 15 Mar 2017 22:03:29 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-66-generic; KDE/5.18.0; x86_64; ; ) |
Hi,
With cc on HP-UX 11.31, test-limits-h.c fails to compile, apparently
because LLONG_MIN, LLONG_MAX, ULLONG_MAX are not defined.
But /usr/include/limits.h defines LONG_LONG_MIN, LONG_LONG_MAX, ULONG_LONG_MAX.
So, here's the simple fix:
2017-03-14 Bruno Haible <address@hidden>
limits-h: Make it work with HP-UX cc.
* lib/limits.in.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define if not
defined.
diff --git a/lib/limits.in.h b/lib/limits.in.h
index 7ff33ab..1846704 100644
--- a/lib/limits.in.h
+++ b/lib/limits.in.h
@@ -28,6 +28,17 @@
#ifndef address@hidden@_LIMITS_H
#define address@hidden@_LIMITS_H
+/* For HP-UX 11.31. */
+#if defined LONG_LONG_MIN && !defined LLONG_MIN
+# define LLONG_MIN LONG_LONG_MIN
+#endif
+#if defined LONG_LONG_MAX && !defined LLONG_MAX
+# define LLONG_MAX LONG_LONG_MAX
+#endif
+#if defined ULONG_LONG_MAX && !defined ULLONG_MAX
+# define ULLONG_MAX ULONG_LONG_MAX
+#endif
+
/* The number of usable bits in an unsigned or signed integer type
with minimum value MIN and maximum value MAX, as an int expression
suitable in #if. Cover all known practical hosts. This
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- limits.h test with HP-UX cc,
Bruno Haible <=