[Python-Dev] Include/pyport.h now exists
Thomas Wouters
thomas@xs4all.net
Sat, 8 Jul 2000 21:21:50 +0200
--GPJrCs/72TxItFYR
Content-Type: text/plain; charset=us-ascii
On Sat, Jul 08, 2000 at 12:31:27AM -0400, Tim Peters wrote:
> Would someone who understands (& can test! I can't yet) autoconfig please
> follow up on the last part? The stuff I checked in "fails safe", i.e. the
> lack of autoconfig support should not cause problems on any of your
> platforms.
Can't say I understand all of autoconf but I read enough of the info pages
to be able to do this ! :-) I couldn't find an existing test that covers
this, so I used your example to make one; patch attached. It detects my
linux box properly as 'doesn't zero-fill when right-shifting a negative
number', but I haven't a Cray J90 handy to test the opposite ;)
Feel free to change the wording to something a bit less... wordy, though ;)
Oh, and don't forget to run autoheader & automake before checking in.
--
Thomas Wouters <thomas@xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
--GPJrCs/72TxItFYR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="autoconf.patch"
*** src-lm+rm/configure.in Wed Jul 5 12:38:09 2000
--- src/configure.in Sat Jul 8 20:18:35 2000
***************
*** 1136,1141 ****
--- 1136,1154 ----
# check for endianness
AC_C_BIGENDIAN
+ # Check whether signed-right-shift fills the left hand bits with the sign
+ # bit, or with zero (like the Cray J90 does, according to Tim Peters.)
+ signed_rshift_0fills="unknown"
+ AC_MSG_CHECKING(whether right-shift of negative number pads with zeros)
+ AC_TRY_RUN([
+ int main()
+ {
+ exit(((-1)>>3 == -1) ? 1 : 0);
+ }
+ ],AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) signed_rshift_0fills="yes",
+ signed_rshift_0fills="no")
+ AC_MSG_RESULT($signed_rshift_0fills)
+
# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
# Add sys/socket.h to confdefs.h
cat >> confdefs.h <<\EOF
--GPJrCs/72TxItFYR--