]> granicus.if.org Git - python/commitdiff
Fixed #1638: %zd configure test fails on Linux
authorChristian Heimes <christian@cheimes.de>
Sun, 16 Dec 2007 21:39:43 +0000 (21:39 +0000)
committerChristian Heimes <christian@cheimes.de>
Sun, 16 Dec 2007 21:39:43 +0000 (21:39 +0000)
Misc/NEWS
configure
configure.in

index 3c95ca53aee28a6534d0335b62842c60262da59b..a45ac11a016cfe931661e2fd1626a65d06b04b18 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.6 alpha 1?
 Core and builtins
 -----------------
 
+- Issue #1638: %zd configure test fails on Linux
+
 - Issue #1620: New property decorator syntax was modifying the decorator
   in place instead of creating a new decorator object.
 
index 4aa1730d8e1b68a5a77f0ebbbee55a367ae725e0..f31069e88abfa8b0e92f9defba0a2f899e3f4aa5 100755 (executable)
--- a/configure
+++ b/configure
@@ -23176,9 +23176,9 @@ cat >>conftest.$ac_ext <<_ACEOF
 #include <stddef.h>
 #include <string.h>
 
-int main()
-{
-    char buffer[256];
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
 
 #ifdef HAVE_SSIZE_T
 typedef ssize_t Py_ssize_t;
@@ -23188,6 +23188,10 @@ typedef long Py_ssize_t;
 typedef int Py_ssize_t;
 #endif
 
+int main()
+{
+    char buffer[256];
+
     if(sprintf(buffer, "%zd", (size_t)123) < 0)
                return 1;
 
index 496495483e198a8f27e2d3164e68f3fe8c0caac6..799499bc36b7c0cf3f16856ce603e482942cb8a6 100644 (file)
@@ -3459,9 +3459,9 @@ AC_TRY_RUN([#include <stdio.h>
 #include <stddef.h>
 #include <string.h>
 
-int main()
-{
-    char buffer[256];
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
 
 #ifdef HAVE_SSIZE_T
 typedef ssize_t Py_ssize_t;
@@ -3471,6 +3471,10 @@ typedef long Py_ssize_t;
 typedef int Py_ssize_t;
 #endif
 
+int main()
+{
+    char buffer[256];
+
     if(sprintf(buffer, "%zd", (size_t)123) < 0)
                return 1;