]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
add test for volatile
authorGuido van Rossum <guido@python.org>
Tue, 11 Oct 1994 15:04:27 +0000 (15:04 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 11 Oct 1994 15:04:27 +0000 (15:04 +0000)
acconfig.h
config.h.in
configure
configure.in

index 494dea2908d275d7dbebd93da3d341238ac987d4..a68c11ca05d13f5774dc3a86fb5f5ee328fb0ed2 100644 (file)
@@ -63,5 +63,8 @@
 /* Define if you want to use the GNU readline library */
 #undef WITH_READLINE
 
+/* Define to empty if the keyword does not work.  */
+#undef volatile
+
 \f
 /* Leave that blank line there-- autoheader needs it! */
index a3fc5062cdfdae456ce9c89b0adff2edbcd8bdd0..d91fbd9049782d70ef9afccf08b90d16d34f3f42 100644 (file)
 /* Define if you want to use the GNU readline library */
 #undef WITH_READLINE
 
+/* Define to empty if the keyword does not work.  */
+#undef volatile
+
 /* Define if you have chown.  */
 #undef HAVE_CHOWN
 
index 656c5753361e5204a5059f8be2c0ab47109bd1f7..981af9d086532c66962326be0434c30e351666d0 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #!/bin/sh
-# From configure.in Revision: 1.6 
+# From configure.in Revision: 1.8 
 #!/bin/sh
 # Guess values for system-dependent variables and create Makefiles.
 # Generated automatically using autoconf version 1.11 
@@ -1916,7 +1916,34 @@ fi
 rm -f conftest*
 
 
-test -n "$silent" || echo "checking for signed char"
+test -n "$silent" || echo "checking for lack of working volatile"
+cat > conftest.${ac_ext} <<EOF
+#include "confdefs.h"
+
+int main() { return 0; }
+int t() { volatile int x; x = 0;; return 0; }
+EOF
+if eval $ac_compile; then
+  :
+else
+  rm -rf conftest*
+  
+{
+test -n "$verbose" && \
+echo " defining" volatile to be empty
+echo "#define" volatile "" >> confdefs.h
+DEFS="$DEFS -Dvolatile="
+ac_sed_defs="${ac_sed_defs}\${ac_dA}volatile\${ac_dB}volatile\${ac_dC}\${ac_dD}
+\${ac_uA}volatile\${ac_uB}volatile\${ac_uC}\${ac_uD}
+\${ac_eA}volatile\${ac_eB}volatile\${ac_eC}\${ac_eD}
+"
+}
+
+fi
+rm -f conftest*
+
+
+test -n "$silent" || echo "checking for lack of working signed char"
 cat > conftest.${ac_ext} <<EOF
 #include "confdefs.h"
 
index 7201d84eee869e3a6047c9a1f2e409a7e16b0c88..6ca1f5a3db0fa9206234478d86f1ec5311705945 100644 (file)
@@ -214,7 +214,9 @@ AC_CHAR_UNSIGNED
 
 AC_CONST
 
-AC_COMPILE_CHECK([signed char], [], [signed char c;], [], AC_DEFINE(signed, []))
+AC_COMPILE_CHECK([lack of working volatile],[],[volatile int x; x = 0;],,AC_DEFINE(volatile,))
+
+AC_COMPILE_CHECK([lack of working signed char], [], [signed char c;],,AC_DEFINE(signed, []))
 
 AC_CHECKING(for prototypes)
 AC_TEST_PROGRAM([