summaryrefslogtreecommitdiff
path: root/lib/stdint.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-04-11 09:02:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-04-11 09:03:22 -0700
commitb134c206bc07dbbb9e74b3be2db269c4f1196e40 (patch)
tree1e6633483030e7fca0dc19ac0a63efe420f58e8d /lib/stdint.in.h
parentbb30fa951c23911f5c3a14d9d46d1a3260a50fe0 (diff)
downloademacs-b134c206bc07dbbb9e74b3be2db269c4f1196e40.tar.gz
Sync with gnulib
This is for picky compilers whose stdint.h fails our C11 tests. Problem reported for clang by Philipp Stephani (Bug#23261). This incorporates: 2016-04-11 stdint: port to strict C11 left shift * doc/misc/texinfo.tex, lib/stdint.in.h: Copy from gnulib.
Diffstat (limited to 'lib/stdint.in.h')
-rw-r--r--lib/stdint.in.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index 0bb9ad41b29..cf65ec62e97 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -118,15 +118,10 @@
picky compilers. */
#define _STDINT_MIN(signed, bits, zero) \
- ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
+ ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
#define _STDINT_MAX(signed, bits, zero) \
- ((signed) \
- ? ~ _STDINT_MIN (signed, bits, zero) \
- : /* The expression for the unsigned case. The subtraction of (signed) \
- is a nop in the unsigned case and avoids "signed integer overflow" \
- warnings in the signed case. */ \
- ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
#if !GNULIB_defined_stdint_types