summaryrefslogtreecommitdiffstats
path: root/patches/Python-2.6.2/0004--configure.in-printf-format-zd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/Python-2.6.2/0004--configure.in-printf-format-zd.patch')
-rw-r--r--patches/Python-2.6.2/0004--configure.in-printf-format-zd.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/patches/Python-2.6.2/0004--configure.in-printf-format-zd.patch b/patches/Python-2.6.2/0004--configure.in-printf-format-zd.patch
new file mode 100644
index 000000000..5b2d5533c
--- /dev/null
+++ b/patches/Python-2.6.2/0004--configure.in-printf-format-zd.patch
@@ -0,0 +1,54 @@
+From 44a7b5cd5bca0d11b785d917a842d6436f6ad19f Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Thu, 23 Apr 2009 08:49:08 +0200
+Subject: [PATCH] [configure.in] printf format %zd
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ configure.in | 23 +++++++++++++++++++----
+ 1 files changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 0af62ae..b86ee74 100644
+--- a/configure.in
++++ b/configure.in
+@@ -3700,7 +3700,8 @@ else
+ fi
+
+ AC_MSG_CHECKING(for %zd printf() format support)
+-AC_TRY_RUN([#include <stdio.h>
++AC_CACHE_VAL([ac_cv_py_format_size_t],[
++ AC_RUN_IFELSE([#include <stdio.h>
+ #include <stddef.h>
+ #include <string.h>
+
+@@ -3734,9 +3735,23 @@ int main()
+
+ return 0;
+ }],
+-[AC_MSG_RESULT(yes)
+- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
+- AC_MSG_RESULT(no))
++ [ac_cv_py_format_size_t=yes],
++ [ac_cv_py_format_size_t=no],
++ [ac_cv_py_format_size_t=cross],
++)])
++
++case "${ac_cv_py_format_size_t}" in
++yes)
++ AC_MSG_RESULT([yes])
++ AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])
++ ;;
++no)
++ AC_MSG_RESULT([no])
++ ;;
++*)
++ AC_MSG_ERROR([cross compiling - please ac_cv_py_format_size_t to yes (for working %zd printf() format support) or no])
++ ;;
++esac
+
+ AC_CHECK_TYPE(socklen_t,,
+ AC_DEFINE(socklen_t,int,
+--
+1.5.6.3
+