summaryrefslogtreecommitdiff
path: root/lib/intprops.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-01-30 11:22:51 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-01-30 11:22:51 -0800
commitfcabb1a6e66f7e6cf4fe0984c4d5c169f4decd8a (patch)
tree4926d2f913499164126038fc65515eff32521172 /lib/intprops.h
parent253f7d1bc55aec58986aa36f8a6e4725d311ed24 (diff)
parent3de84ad9c45382c181e3383d433442f4e19ba722 (diff)
downloademacs-fcabb1a6e66f7e6cf4fe0984c4d5c169f4decd8a.tar.gz
emacs-fcabb1a6e66f7e6cf4fe0984c4d5c169f4decd8a.tar.bz2
emacs-fcabb1a6e66f7e6cf4fe0984c4d5c169f4decd8a.zip
Merge: import mktime and move-if-change fixes from gnulib
Diffstat (limited to 'lib/intprops.h')
-rw-r--r--lib/intprops.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/intprops.h b/lib/intprops.h
index 511a5aa9890..58b1b3fbf44 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -49,11 +49,11 @@
? (t) 0 \
: TYPE_SIGNED_MAGNITUDE (t) \
? ~ (t) 0 \
- : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+ : ~ TYPE_MAXIMUM (t)))
# define TYPE_MAXIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) -1 \
- : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
/* Return zero if T can be determined to be an unsigned type.
Otherwise, return 1.