diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-04-11 09:07:15 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-04-11 09:07:15 -0700 |
commit | ff2c76476479c43607825df01c78d8f239caefb5 (patch) | |
tree | 9eb72adddeab4fb7b0cebf49df81ab31f3bf8a13 /m4 | |
parent | d6ea6453f3d1696b9e6cd0a0222fc77dc646365c (diff) | |
parent | 80128a784912096c6b0ee46b76b068e019cff057 (diff) |
Merge from origin/emacs-25
80128a7 Fix stability confusion in sort-tests
1e4aa42 Avoid describe-key error with lambdas
a05fb21 * lisp/emacs-lisp/package.el (package-install-selected-packag...
f501116 Sync with gnulib
c4963f9 Fix doc for Universal Time
Diffstat (limited to 'm4')
-rw-r--r-- | m4/stdint.m4 | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/m4/stdint.m4 b/m4/stdint.m4 index 0f40ce803b..0b4b9060db 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -1,4 +1,4 @@ -# stdint.m4 serial 43 +# stdint.m4 serial 44 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -70,6 +70,8 @@ AC_DEFUN_ONCE([gl_STDINT_H], AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#define __STDC_CONSTANT_MACROS 1 +#define __STDC_LIMIT_MACROS 1 #include <stdint.h> /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) @@ -218,6 +220,8 @@ struct s { AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#define __STDC_CONSTANT_MACROS 1 +#define __STDC_LIMIT_MACROS 1 #include <stdint.h> ] gl_STDINT_INCLUDES @@ -279,6 +283,29 @@ static const char *macro_values[] = ]) fi if test "$gl_cv_header_working_stdint_h" = yes; then + dnl Now see whether the system <stdint.h> works without + dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. + AC_CACHE_CHECK([whether stdint.h predates C++11], + [gl_cv_header_stdint_predates_cxx11_h], + [gl_cv_header_stdint_predates_cxx11_h=yes + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include <stdint.h> +] +gl_STDINT_INCLUDES +[ +intmax_t im = INTMAX_MAX; +int32_t i32 = INT32_C (0x7fffffff); + ]])], + [gl_cv_header_stdint_predates_cxx11_h=no])]) + + if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then + AC_DEFINE([__STDC_CONSTANT_MACROS], [1], + [Define to 1 if the system <stdint.h> predates C++11.]) + AC_DEFINE([__STDC_LIMIT_MACROS], [1], + [Define to 1 if the system <stdint.h> predates C++11.]) + fi STDINT_H= else dnl Check for <sys/inttypes.h>, and for |