aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnulib/import/stdint.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gnulib/import/stdint.in.h')
-rw-r--r--gdb/gnulib/import/stdint.in.h56
1 files changed, 14 insertions, 42 deletions
diff --git a/gdb/gnulib/import/stdint.in.h b/gdb/gnulib/import/stdint.in.h
index 94e7c81..c86ab09 100644
--- a/gdb/gnulib/import/stdint.in.h
+++ b/gdb/gnulib/import/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -13,7 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, see <https://www.gnu.org/licenses/>. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/*
* ISO C 99 <stdint.h> for platforms that lack it.
@@ -83,15 +83,6 @@
LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */
#include <limits.h>
-/* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
- wint_t. */
-#if @GNULIB_OVERRIDES_WINT_T@
-# undef WINT_MIN
-# undef WINT_MAX
-# define WINT_MIN 0x0U
-# define WINT_MAX 0xffffffffU
-#endif
-
#if ! @HAVE_C99_STDINT_H@
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
@@ -128,13 +119,8 @@
Return an unspecified value if BITS == 0, adding a check to pacify
picky compilers. */
-/* These are separate macros, because if you try to merge these macros into
- a single one, HP-UX cc rejects the resulting expression in constant
- expressions. */
-# define _STDINT_UNSIGNED_MIN(bits, zero) \
- (zero)
-# define _STDINT_SIGNED_MIN(bits, zero) \
- (~ _STDINT_MAX (1, bits, zero))
+# define _STDINT_MIN(signed, bits, zero) \
+ ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
# define _STDINT_MAX(signed, bits, zero) \
(((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
@@ -517,15 +503,15 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
# undef PTRDIFF_MAX
# if @APPLE_UNIVERSAL_BUILD@
# ifdef _LP64
-# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l)
+# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
# else
-# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0)
+# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
# endif
# else
# define PTRDIFF_MIN \
- _STDINT_SIGNED_MIN (@BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
# define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
# endif
@@ -533,13 +519,9 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* sig_atomic_t limits */
# undef SIG_ATOMIC_MIN
# undef SIG_ATOMIC_MAX
-# if @HAVE_SIGNED_SIG_ATOMIC_T@
-# define SIG_ATOMIC_MIN \
- _STDINT_SIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@)
-# else
-# define SIG_ATOMIC_MIN \
- _STDINT_UNSIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@)
-# endif
+# define SIG_ATOMIC_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
+ 0@SIG_ATOMIC_T_SUFFIX@)
# define SIG_ATOMIC_MAX \
_STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
@@ -575,26 +557,16 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
# endif
# undef WCHAR_MIN
# undef WCHAR_MAX
-# if @HAVE_SIGNED_WCHAR_T@
-# define WCHAR_MIN \
- _STDINT_SIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
-# else
-# define WCHAR_MIN \
- _STDINT_UNSIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
-# endif
+# define WCHAR_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
# define WCHAR_MAX \
_STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
/* wint_t limits */
# undef WINT_MIN
# undef WINT_MAX
-# if @HAVE_SIGNED_WINT_T@
-# define WINT_MIN \
- _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-# else
-# define WINT_MIN \
- _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-# endif
+# define WINT_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
# define WINT_MAX \
_STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)