Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Fix wrong scoping of {U, }LLONG_MAX. More cases, not...



details:   https://anonhg.NetBSD.org/src/rev/bbe29696bd11
branches:  trunk
changeset: 447699:bbe29696bd11
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon Jan 21 20:28:17 2019 +0000

description:
Fix wrong scoping of {U,}LLONG_MAX. More cases, not just amd64.
PR 53298 from Roberto E. Vargas Caballero.

diffstat:

 sys/arch/alpha/include/limits.h   |  10 +++++-----
 sys/arch/arm/include/limits.h     |  10 +++++-----
 sys/arch/hppa/include/limits.h    |  10 +++++-----
 sys/arch/i386/include/limits.h    |  10 +++++-----
 sys/arch/ia64/include/limits.h    |  10 +++++-----
 sys/arch/m68k/include/limits.h    |  10 +++++-----
 sys/arch/mips/include/limits.h    |  16 ++++++++--------
 sys/arch/powerpc/include/limits.h |  16 ++++++++--------
 sys/arch/sh3/include/limits.h     |  10 +++++-----
 sys/arch/sparc/include/limits.h   |  10 +++++-----
 sys/arch/vax/include/limits.h     |  10 +++++-----
 11 files changed, 61 insertions(+), 61 deletions(-)

diffs (truncated from 353 to 300 lines):

diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/alpha/include/limits.h
--- a/sys/arch/alpha/include/limits.h   Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/alpha/include/limits.h   Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.16 2014/04/21 10:53:47 matt Exp $ */
+/* $NetBSD: limits.h,v 1.17 2019/01/21 20:28:17 dholland Exp $ */
 
 /*
  * Copyright (c) 1988, 1993
@@ -64,10 +64,6 @@
 #define        LONG_MAX        0x7fffffffffffffffL     /* max for a long */
 #define        LONG_MIN        (-0x7fffffffffffffffL-1) /* min for a long */
 
-#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
-    defined(_NETBSD_SOURCE)
-#define        SSIZE_MAX       LONG_MAX        /* max value for a ssize_t */
-
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
     defined(_NETBSD_SOURCE)
 #define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
@@ -75,6 +71,10 @@
 #define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
 #endif
 
+#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
+    defined(_NETBSD_SOURCE)
+#define        SSIZE_MAX       LONG_MAX        /* max value for a ssize_t */
+
 #if defined(_NETBSD_SOURCE)
 #define        SSIZE_MIN       LONG_MIN        /* min value for a ssize_t */
 #define        SIZE_T_MAX      ULONG_MAX       /* max value for a size_t */
diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/arm/include/limits.h
--- a/sys/arch/arm/include/limits.h     Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/arm/include/limits.h     Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.18 2014/02/24 16:57:57 christos Exp $     */
+/*     $NetBSD: limits.h,v 1.19 2019/01/21 20:28:17 dholland Exp $     */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -60,10 +60,6 @@
 #define        LONG_MIN        (-0x7fffffffL-1)        /* min value for a long */
 #endif
 
-#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
-    defined(_NETBSD_SOURCE)
-#define        SSIZE_MAX       LONG_MAX        /* max value for a ssize_t */
-
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
     defined(_NETBSD_SOURCE)
 #define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
@@ -71,6 +67,10 @@
 #define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
 #endif
 
+#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
+    defined(_NETBSD_SOURCE)
+#define        SSIZE_MAX       LONG_MAX        /* max value for a ssize_t */
+
 #if defined(_NETBSD_SOURCE)
 #define        SSIZE_MIN       LONG_MIN        /* min value for a ssize_t */
 #define        SIZE_T_MAX      ULONG_MAX       /* max value for a size_t */
diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/hppa/include/limits.h
--- a/sys/arch/hppa/include/limits.h    Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/hppa/include/limits.h    Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.15 2013/04/11 00:57:34 christos Exp $     */
+/*     $NetBSD: limits.h,v 1.16 2019/01/21 20:28:17 dholland Exp $     */
 
 /*     $OpenBSD: limits.h,v 1.2 2000/07/31 20:06:02 millert Exp $      */
 
@@ -89,10 +89,6 @@
 #define        LONG_MAX        0x7fffffffL     /* max value for a long */
 #define        LONG_MIN        (-0x7fffffffL-1)        /* min value for a long */
 
-#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
-    defined(_NETBSD_SOURCE)
-#define        SSIZE_MAX       INT_MAX         /* max value for a ssize_t */
-
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
     defined(_NETBSD_SOURCE)
 #define ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
@@ -100,6 +96,10 @@
 #define LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
 #endif
 
+#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
+    defined(_NETBSD_SOURCE)
+#define        SSIZE_MAX       INT_MAX         /* max value for a ssize_t */
+
 #if defined(_NETBSD_SOURCE)
 #define        SSIZE_MIN       INT_MIN         /* min value for a ssize_t */
 #define SIZE_T_MAX      UINT_MAX        /* max value for a size_t */
diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/i386/include/limits.h
--- a/sys/arch/i386/include/limits.h    Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/i386/include/limits.h    Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.25 2014/04/21 10:53:47 matt Exp $ */
+/*     $NetBSD: limits.h,v 1.26 2019/01/21 20:28:17 dholland Exp $     */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -54,10 +54,6 @@
 #define        LONG_MAX        0x7fffffffL     /* max value for a long */
 #define        LONG_MIN        (-0x7fffffffL-1)        /* min value for a long */
 
-#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
-    defined(_NETBSD_SOURCE)
-#define        SSIZE_MAX       INT_MAX         /* max value for a ssize_t */
-
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
     defined(_NETBSD_SOURCE)
 #define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
@@ -65,6 +61,10 @@
 #define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
 #endif
 
+#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
+    defined(_NETBSD_SOURCE)
+#define        SSIZE_MAX       INT_MAX         /* max value for a ssize_t */
+
 #if defined(_NETBSD_SOURCE)
 #define        SSIZE_MIN       INT_MIN         /* min value for a ssize_t */
 #define        SIZE_T_MAX      UINT_MAX        /* max value for a size_t */
diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/ia64/include/limits.h
--- a/sys/arch/ia64/include/limits.h    Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/ia64/include/limits.h    Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.8 2014/04/21 10:53:47 matt Exp $  */
+/*     $NetBSD: limits.h,v 1.9 2019/01/21 20:28:17 dholland Exp $      */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -53,10 +53,6 @@
 #define        LONG_MIN        (-0x7fffffffffffffffL-1)        /* min value for a long */
 
 
-#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
-    defined(_NETBSD_SOURCE)
-#define        SSIZE_MAX       LONG_MAX        /* max value for a ssize_t */
-
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
     defined(_NETBSD_SOURCE)
 #define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
@@ -64,6 +60,10 @@
 #define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
 #endif
 
+#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
+    defined(_NETBSD_SOURCE)
+#define        SSIZE_MAX       LONG_MAX        /* max value for a ssize_t */
+
 #if defined(_NETBSD_SOURCE)
 #define        SSIZE_MIN       LONG_MIN        /* min value for a ssize_t */
 #define        SIZE_T_MAX      ULONG_MAX       /* max value for a size_t */
diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/m68k/include/limits.h
--- a/sys/arch/m68k/include/limits.h    Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/m68k/include/limits.h    Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.23 2014/04/21 10:53:47 matt Exp $ */
+/*     $NetBSD: limits.h,v 1.24 2019/01/21 20:28:17 dholland Exp $     */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -54,10 +54,6 @@
 #define        LONG_MAX        0x7fffffffL     /* max value for a long */
 #define        LONG_MIN        (-0x7fffffffL-1)        /* min value for a long */
 
-#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
-    defined(_NETBSD_SOURCE)
-#define SSIZE_MAX      INT_MAX         /* max value for a ssize_t */
-
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
     defined(_NETBSD_SOURCE)
 #define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
@@ -65,6 +61,10 @@
 #define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
 #endif
 
+#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
+    defined(_NETBSD_SOURCE)
+#define SSIZE_MAX      INT_MAX         /* max value for a ssize_t */
+
 #if defined(_NETBSD_SOURCE)
 #define        SSIZE_MIN       INT_MIN         /* min value for a ssize_t */
 #define SIZE_T_MAX     UINT_MAX        /* max value for a size_t */
diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/mips/include/limits.h
--- a/sys/arch/mips/include/limits.h    Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/mips/include/limits.h    Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.26 2014/04/21 10:53:47 matt Exp $ */
+/*     $NetBSD: limits.h,v 1.27 2019/01/21 20:28:18 dholland Exp $     */
 
 /*
  * Copyright (c) 1988, 1993
@@ -70,6 +70,13 @@
 #define        LONG_MIN        (-0x7fffffff-1) /* min value for a long */
 #endif
 
+#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
+    defined(_NETBSD_SOURCE)
+#define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
+#define        LLONG_MAX       0x7fffffffffffffffLL    /* max signed long long */
+#define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
+#endif
+
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #ifdef _LP64
@@ -78,13 +85,6 @@
 #define        SSIZE_MAX       INT_MAX         /* max value for a ssize_t */
 #endif
 
-#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
-    defined(_NETBSD_SOURCE)
-#define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
-#define        LLONG_MAX       0x7fffffffffffffffLL    /* max signed long long */
-#define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
-#endif
-
 #if defined(_NETBSD_SOURCE)
 #ifdef _LP64
 #define        SSIZE_MIN       LONG_MIN        /* min value for a ssize_t */
diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/powerpc/include/limits.h
--- a/sys/arch/powerpc/include/limits.h Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/powerpc/include/limits.h Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.19 2014/04/21 10:53:47 matt Exp $ */
+/*     $NetBSD: limits.h,v 1.20 2019/01/21 20:28:18 dholland Exp $     */
 
 /*
  * Copyright (c) 1988, 1993
@@ -70,6 +70,13 @@
 #define        LONG_MIN        (-0x7fffffff-1) /* min value for a long */
 #endif
 
+#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
+    defined(_NETBSD_SOURCE)
+#define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
+#define        LLONG_MAX       0x7fffffffffffffffLL    /* max signed long long */
+#define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
+#endif
+
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
     defined(_NETBSD_SOURCE)
 #ifdef _LP64
@@ -78,13 +85,6 @@
 #define        SSIZE_MAX       INT_MAX         /* max value for a ssize_t */
 #endif
 
-#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
-    defined(_NETBSD_SOURCE)
-#define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
-#define        LLONG_MAX       0x7fffffffffffffffLL    /* max signed long long */
-#define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
-#endif
-
 #if defined(_NETBSD_SOURCE)
 #ifdef _LP64
 #define        SSIZE_MIN       LONG_MIN        /* min value for a ssize_t */
diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/sh3/include/limits.h
--- a/sys/arch/sh3/include/limits.h     Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/sh3/include/limits.h     Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.14 2014/04/21 10:53:48 matt Exp $ */
+/*     $NetBSD: limits.h,v 1.15 2019/01/21 20:28:18 dholland Exp $     */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -54,10 +54,6 @@
 #define        LONG_MAX        0x7fffffffL     /* max value for a long */
 #define        LONG_MIN        (-0x7fffffffL-1)        /* min value for a long */
 
-#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
-    defined(_NETBSD_SOURCE)
-#define        SSIZE_MAX       INT_MAX         /* max value for a ssize_t */
-
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
     defined(_NETBSD_SOURCE)
 #define        ULLONG_MAX      0xffffffffffffffffULL   /* max unsigned long long */
@@ -65,6 +61,10 @@
 #define        LLONG_MIN       (-0x7fffffffffffffffLL-1) /* min signed long long */
 #endif
 
+#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
+    defined(_NETBSD_SOURCE)
+#define        SSIZE_MAX       INT_MAX         /* max value for a ssize_t */
+
 #if defined(_NETBSD_SOURCE)
 #define        SSIZE_MIN       INT_MIN         /* min value for a ssize_t */
 #define        SIZE_T_MAX      UINT_MAX        /* max value for a size_t */
diff -r c21e4315ee3b -r bbe29696bd11 sys/arch/sparc/include/limits.h
--- a/sys/arch/sparc/include/limits.h   Mon Jan 21 20:28:08 2019 +0000
+++ b/sys/arch/sparc/include/limits.h   Mon Jan 21 20:28:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.22 2014/04/21 10:53:48 matt Exp $ */
+/*     $NetBSD: limits.h,v 1.23 2019/01/21 20:28:18 dholland Exp $ */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.



Home | Main Index | Thread Index | Old Index