]> Savannah Git Hosting - gnulib.git/commit
intprops, mktime, strtol: assume two's complement
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Apr 2016 07:06:36 +0000 (00:06 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Apr 2016 07:13:23 +0000 (00:13 -0700)
commita4910b9481a9ce515cd5971c343efa4c1d046ef7
tree1d55d0289c5054e07d836aa96ac054048d110979
parent705764b377ebeef7bdba1a87fafd99cd56b6f3c9
intprops, mktime, strtol: assume two's complement

These macros were not portable to every conforming C11 ones'
complement platform.  It's not worth the hassle of porting to some
platforms that use ones' complement or signed magnitude, as such
platforms are almost purely theoretical nowadays and porting even
to some of them makes the code harder to review for little
practical benefit.  Problem reported by Florian Weimer in:
https://sourceware.org/ml/libc-alpha/2016-04/msg00295.html
* lib/intprops.h (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
(TYPE_SIGNED_MAGNITUDE, _GL_INT_TWOS_COMPLEMENT):
* lib/mktime.c (TYPE_TWOS_COMPLEMENT):
* lib/strtol.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
(TYPE_SIGNED_MAGNITUDE):
Remove.  All uses rewritten to assume two's complement, which is
all we can reasonably test nowadays anyway.
* top/maint.mk (_intprops_names): Remove the removed macros.
ChangeLog
NEWS
lib/intprops.h
lib/mktime.c
lib/strtol.c
lib/utimecmp.c
tests/test-intprops.c
top/maint.mk