summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in20
1 files changed, 17 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index 410f1af..711e19e 100644
--- a/configure.in
+++ b/configure.in
@@ -3352,14 +3352,28 @@ AC_TRY_RUN([#include <stdio.h>
int main()
{
- char buffer[4];
+ char buffer[256];
+
+#ifdef HAVE_SSIZE_T
+typedef ssize_t Py_ssize_t;
+#elif SIZEOF_VOID_P == SIZEOF_LONG
+typedef long Py_ssize_t;
+#else
+typedef int Py_ssize_t;
+#endif
if(sprintf(buffer, "%zd", (size_t)123) < 0)
return 1;
- if (strncmp(buffer, "123", 3))
+ if (strcmp(buffer, "123"))
return 1;
-
+
+ if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
+ return 1;
+
+ if (strcmp(buffer, "-123"))
+ return 1;
+
return 0;
}],
[AC_MSG_RESULT(yes)