diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2012-12-02 13:20:22 +0000 |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2012-12-02 13:20:22 +0000 |
commit | 598946eb971b73fb47b8d32227b89bf5f5b659e1 (patch) | |
tree | d1d03e18aad60f97e53a561f6a763b2de28ce45f /configure.ac | |
parent | 016f123dcf902d3d85c5a1dd9f6f49f65090861f (diff) | |
download | cpython-598946eb971b73fb47b8d32227b89bf5f5b659e1.tar.gz |
Issue 10052: fix failed uint32_t / uint64_t / int32_t / int64_t detection on some platforms.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 97332af08c..ccb42d44cc 100644 --- a/configure.ac +++ b/configure.ac @@ -1469,10 +1469,30 @@ AC_TYPE_PID_T AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void]) AC_TYPE_SIZE_T AC_TYPE_UID_T + +# There are two separate checks for each of the exact-width integer types we +# need. First we check whether the type is available using the usual +# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h> +# and <stdint.h> where available). We then also use the special type checks of +# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available +# directly, #define's uint32_t to be a suitable type. + +AC_CHECK_TYPE(uint32_t, + AC_DEFINE(HAVE_UINT32_T, 1, [Define if your compiler provides uint32_t.]),,) AC_TYPE_UINT32_T + +AC_CHECK_TYPE(uint64_t, + AC_DEFINE(HAVE_UINT64_T, 1, [Define if your compiler provides uint64_t.]),,) AC_TYPE_UINT64_T + +AC_CHECK_TYPE(int32_t, + AC_DEFINE(HAVE_INT32_T, 1, [Define if your compiler provides int32_t.]),,) AC_TYPE_INT32_T + +AC_CHECK_TYPE(int64_t, + AC_DEFINE(HAVE_INT64_T, 1, [Define if your compiler provides int64_t.]),,) AC_TYPE_INT64_T + AC_CHECK_TYPE(ssize_t, AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,) |