summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in48
1 files changed, 48 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 4a0bf68..2a0745f 100644
--- a/configure.in
+++ b/configure.in
@@ -3806,6 +3806,54 @@ else
AC_MSG_RESULT(no)
fi
+if test "$have_long_long" = yes
+then
+ AC_MSG_CHECKING(for %lld and %llu printf() format support)
+ AC_CACHE_VAL(ac_cv_have_long_long_format,
+ AC_TRY_RUN([[
+ #include <stdio.h>
+ #include <stddef.h>
+ #include <string.h>
+
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+
+ int main()
+ {
+ char buffer[256];
+
+ if (sprintf(buffer, "%lld", (long long)123) < 0)
+ return 1;
+ if (strcmp(buffer, "123"))
+ return 1;
+
+ if (sprintf(buffer, "%lld", (long long)-123) < 0)
+ return 1;
+ if (strcmp(buffer, "-123"))
+ return 1;
+
+ if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
+ return 1;
+ if (strcmp(buffer, "123"))
+ return 1;
+
+ return 0;
+ }
+ ]], ac_cv_have_long_long_format=yes,
+ ac_cv_have_long_long_format=no,
+ ac_cv_have_long_long_format=no)
+ )
+ AC_MSG_RESULT($ac_cv_have_long_long_format)
+fi
+
+if test $ac_cv_have_long_long_format = yes
+then
+ AC_DEFINE(PY_FORMAT_LONG_LONG, "ll",
+ [Define to printf format modifier for long long type])
+fi
+
+
AC_MSG_CHECKING(for %zd printf() format support)
AC_CACHE_VAL(ac_cv_have_size_t_format,
AC_TRY_RUN([[