diff options
author | Vladimir Marangozov <vladimir.marangozov@t-online.de> | 2000-07-12 03:02:16 (GMT) |
---|---|---|
committer | Vladimir Marangozov <vladimir.marangozov@t-online.de> | 2000-07-12 03:02:16 (GMT) |
commit | 9a5a5d1cb022aeeb07cc2640ec9c1ce0a59a0a2e (patch) | |
tree | 5f8af2a8175be044bf6758ba608a5a16d6c96ac1 | |
parent | bd9848d02fa47c4e21c99b8afdcd35d28c3f309b (diff) | |
download | cpython-9a5a5d1cb022aeeb07cc2640ec9c1ce0a59a0a2e.zip cpython-9a5a5d1cb022aeeb07cc2640ec9c1ce0a59a0a2e.tar.gz cpython-9a5a5d1cb022aeeb07cc2640ec9c1ce0a59a0a2e.tar.bz2 |
Checks whether right shift extends the sign bit.
Patch by Thomas Wouters <thomas@xs4all.net> with small changes of mine
(in main(), use return instead of exit).
Closes patch #100832
(but I can't assign it to myself, nor close it -- sorry)
-rw-r--r-- | configure.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 46dd5f1..763bfbd 100644 --- a/configure.in +++ b/configure.in @@ -1136,6 +1136,19 @@ AC_MSG_RESULT($usable_wchar_t) # check for endianness AC_C_BIGENDIAN +# Check whether right shifting a negative integer extends the sign bit +# or fills with zeros (like the Cray J90, according to Tim Peters). +AC_MSG_CHECKING(whether right shift extends the sign bit) +AC_TRY_RUN([ +int main() +{ + return ((-1)>>3 == -1) ? 1 : 0; +} +], +[AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) + AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) + # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! # Add sys/socket.h to confdefs.h cat >> confdefs.h <<\EOF |