diff --git a/Misc/NEWS b/Misc/NEWS index 3c95ca53aee..a45ac11a016 100644 --- 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. diff --git a/configure b/configure index 4aa1730d8e1..f31069e88ab 100755 --- a/configure +++ b/configure @@ -23176,9 +23176,9 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include -int main() -{ - char buffer[256]; +#ifdef HAVE_SYS_TYPES_H +#include +#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; diff --git a/configure.in b/configure.in index 496495483e1..799499bc36b 100644 --- a/configure.in +++ b/configure.in @@ -3459,9 +3459,9 @@ AC_TRY_RUN([#include #include #include -int main() -{ - char buffer[256]; +#ifdef HAVE_SYS_TYPES_H +#include +#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;