diff options
Diffstat (limited to 'macros/texinfo/texinfo/tp/Texinfo/XS/gnulib/m4/stdint.m4')
-rw-r--r-- | macros/texinfo/texinfo/tp/Texinfo/XS/gnulib/m4/stdint.m4 | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/macros/texinfo/texinfo/tp/Texinfo/XS/gnulib/m4/stdint.m4 b/macros/texinfo/texinfo/tp/Texinfo/XS/gnulib/m4/stdint.m4 index 11d8e8e52d..a785b44ed1 100644 --- a/macros/texinfo/texinfo/tp/Texinfo/XS/gnulib/m4/stdint.m4 +++ b/macros/texinfo/texinfo/tp/Texinfo/XS/gnulib/m4/stdint.m4 @@ -1,5 +1,5 @@ -# stdint.m4 serial 53 -dnl Copyright (C) 2001-2019 Free Software Foundation, Inc. +# stdint.m4 serial 58 +dnl Copyright (C) 2001-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -17,21 +17,12 @@ AC_DEFUN_ONCE([gl_STDINT_H], AC_REQUIRE([gl_LIMITS_H]) AC_REQUIRE([gt_TYPE_WINT_T]) - dnl Check for long long int and unsigned long long int. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_LONG_LONG_INT]) - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) + dnl For backward compatibility. Some packages may still be testing these + dnl macros. + AC_DEFINE([HAVE_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'long long int'.]) + AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'unsigned long long int'.]) dnl Check for <wchar.h>, in the same way as gl_WCHAR_H does. AC_CHECK_HEADERS_ONCE([wchar.h]) @@ -43,7 +34,7 @@ AC_DEFUN_ONCE([gl_STDINT_H], AC_SUBST([HAVE_WCHAR_H]) dnl Check for <inttypes.h>. - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. + AC_CHECK_HEADERS_ONCE([inttypes.h]) if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else @@ -52,7 +43,7 @@ AC_DEFUN_ONCE([gl_STDINT_H], AC_SUBST([HAVE_INTTYPES_H]) dnl Check for <sys/types.h>. - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. + AC_CHECK_HEADERS_ONCE([sys/types.h]) if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else @@ -161,7 +152,7 @@ uintmax_t j = UINTMAX_MAX; /* Check that SIZE_MAX has the correct type, if possible. */ #if 201112 <= __STDC_VERSION__ int k = _Generic (SIZE_MAX, size_t: 0); -#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ +#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \ || (0x5110 <= __SUNPRO_C && !__STDC__)) extern size_t k; extern __typeof__ (SIZE_MAX) k; @@ -311,9 +302,10 @@ static const char *macro_values[] = HAVE_C99_STDINT_H=1 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 + dnl If not, there would be problems when stdint.h is included from C++. + AC_CACHE_CHECK([whether stdint.h works without ISO C predefines], + [gl_cv_header_stdint_without_STDC_macros], + [gl_cv_header_stdint_without_STDC_macros=no AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ @@ -324,13 +316,14 @@ gl_STDINT_INCLUDES intmax_t im = INTMAX_MAX; int32_t i32 = INT32_C (0x7fffffff); ]])], - [gl_cv_header_stdint_predates_cxx11_h=no])]) + [gl_cv_header_stdint_without_STDC_macros=yes]) + ]) - if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then + if test $gl_cv_header_stdint_without_STDC_macros = no; then AC_DEFINE([__STDC_CONSTANT_MACROS], [1], - [Define to 1 if the system <stdint.h> predates C++11.]) + [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.]) + [Define to 1 if the system <stdint.h> predates C++11.]) fi AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], [gl_cv_header_stdint_width], @@ -500,13 +493,9 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], dnl gl_STDINT_INCLUDES AC_DEFUN([gl_STDINT_INCLUDES], [[ - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif ]]) |