diff options
| author | Paul Eggert | 2016-09-15 11:50:23 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-09-15 15:55:30 -0700 |
| commit | 8f4b6a20bfec96086845b2f7161e121b1e41b4ad (patch) | |
| tree | e8c4a85626437b0f77ed0a7b575e7627d45dce9e /m4 | |
| parent | 3c586e182c0694896dda670f5fc663b46c9bac63 (diff) | |
| download | emacs-8f4b6a20bfec96086845b2f7161e121b1e41b4ad.tar.gz emacs-8f4b6a20bfec96086845b2f7161e121b1e41b4ad.zip | |
Update from gnulib
This incorporates:
2016-09-15 stdint: support new _WIDTH macros
2016-09-15 limits-h: new module
2016-09-15 sys_types: avoid glibc 2.25 warnings about major()
2016-09-15 extensions: port to more ISO C TSes
2016-09-13 intprops: new macro TYPE_WIDTH
2016-09-13 extensions: port to recent ISO C TRs
* .gitignore: Add lib/limits.h.
* doc/misc/texinfo.tex, lib/ftoastr.h, lib/intprops.h:
* lib/stdint.in.h, m4/extensions.m4, m4/stdint.m4, m4/stdio_h.m4:
* m4/sys_types_h.m4: Copy from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/limits.in.h, m4/limits-h.m4: New files, copie from gnulib.
* nt/gnulib.mk: Merge changes from lib/gnulib.mk.
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/extensions.m4 | 44 | ||||
| -rw-r--r-- | m4/gnulib-comp.m4 | 4 | ||||
| -rw-r--r-- | m4/limits-h.m4 | 29 | ||||
| -rw-r--r-- | m4/stdint.m4 | 48 | ||||
| -rw-r--r-- | m4/stdio_h.m4 | 6 | ||||
| -rw-r--r-- | m4/sys_types_h.m4 | 27 |
6 files changed, 130 insertions, 28 deletions
diff --git a/m4/extensions.m4 b/m4/extensions.m4 index 6d378ec41c1..3a556b1e1f7 100644 --- a/m4/extensions.m4 +++ b/m4/extensions.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # serial 13 -*- Autoconf -*- | 1 | # serial 14 -*- Autoconf -*- |
| 2 | # Enable extensions on systems that normally disable them. | 2 | # Enable extensions on systems that normally disable them. |
| 3 | 3 | ||
| 4 | # Copyright (C) 2003, 2006-2016 Free Software Foundation, Inc. | 4 | # Copyright (C) 2003, 2006-2016 Free Software Foundation, Inc. |
| @@ -60,7 +60,7 @@ dnl configure.ac when using autoheader 2.62. | |||
| 60 | #ifndef _ALL_SOURCE | 60 | #ifndef _ALL_SOURCE |
| 61 | # undef _ALL_SOURCE | 61 | # undef _ALL_SOURCE |
| 62 | #endif | 62 | #endif |
| 63 | /* Enable general extensions on OS X. */ | 63 | /* Enable general extensions on macOS. */ |
| 64 | #ifndef _DARWIN_C_SOURCE | 64 | #ifndef _DARWIN_C_SOURCE |
| 65 | # undef _DARWIN_C_SOURCE | 65 | # undef _DARWIN_C_SOURCE |
| 66 | #endif | 66 | #endif |
| @@ -68,14 +68,38 @@ dnl configure.ac when using autoheader 2.62. | |||
| 68 | #ifndef _GNU_SOURCE | 68 | #ifndef _GNU_SOURCE |
| 69 | # undef _GNU_SOURCE | 69 | # undef _GNU_SOURCE |
| 70 | #endif | 70 | #endif |
| 71 | /* Use GNU style printf and scanf. */ | ||
| 72 | #ifndef __USE_MINGW_ANSI_STDIO | ||
| 73 | # undef __USE_MINGW_ANSI_STDIO | ||
| 74 | #endif | ||
| 75 | /* Enable threading extensions on Solaris. */ | 71 | /* Enable threading extensions on Solaris. */ |
| 76 | #ifndef _POSIX_PTHREAD_SEMANTICS | 72 | #ifndef _POSIX_PTHREAD_SEMANTICS |
| 77 | # undef _POSIX_PTHREAD_SEMANTICS | 73 | # undef _POSIX_PTHREAD_SEMANTICS |
| 78 | #endif | 74 | #endif |
| 75 | /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ | ||
| 76 | #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ | ||
| 77 | # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ | ||
| 78 | #endif | ||
| 79 | /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ | ||
| 80 | #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ | ||
| 81 | # undef __STDC_WANT_IEC_60559_BFP_EXT__ | ||
| 82 | #endif | ||
| 83 | /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ | ||
| 84 | #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ | ||
| 85 | # undef __STDC_WANT_IEC_60559_DFP_EXT__ | ||
| 86 | #endif | ||
| 87 | /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ | ||
| 88 | #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ | ||
| 89 | # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ | ||
| 90 | #endif | ||
| 91 | /* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ | ||
| 92 | #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ | ||
| 93 | # undef __STDC_WANT_IEC_60559_TYPES_EXT__ | ||
| 94 | #endif | ||
| 95 | /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ | ||
| 96 | #ifndef __STDC_WANT_LIB_EXT2__ | ||
| 97 | # undef __STDC_WANT_LIB_EXT2__ | ||
| 98 | #endif | ||
| 99 | /* Enable extensions specified by ISO/IEC 24747:2009. */ | ||
| 100 | #ifndef __STDC_WANT_MATH_SPEC_FUNCS__ | ||
| 101 | # undef __STDC_WANT_MATH_SPEC_FUNCS__ | ||
| 102 | #endif | ||
| 79 | /* Enable extensions on HP NonStop. */ | 103 | /* Enable extensions on HP NonStop. */ |
| 80 | #ifndef _TANDEM_SOURCE | 104 | #ifndef _TANDEM_SOURCE |
| 81 | # undef _TANDEM_SOURCE | 105 | # undef _TANDEM_SOURCE |
| @@ -104,8 +128,14 @@ dnl configure.ac when using autoheader 2.62. | |||
| 104 | AC_DEFINE([_ALL_SOURCE]) | 128 | AC_DEFINE([_ALL_SOURCE]) |
| 105 | AC_DEFINE([_DARWIN_C_SOURCE]) | 129 | AC_DEFINE([_DARWIN_C_SOURCE]) |
| 106 | AC_DEFINE([_GNU_SOURCE]) | 130 | AC_DEFINE([_GNU_SOURCE]) |
| 107 | AC_DEFINE([__USE_MINGW_ANSI_STDIO]) | ||
| 108 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | 131 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) |
| 132 | AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) | ||
| 133 | AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) | ||
| 134 | AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__]) | ||
| 135 | AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__]) | ||
| 136 | AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__]) | ||
| 137 | AC_DEFINE([__STDC_WANT_LIB_EXT2__]) | ||
| 138 | AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__]) | ||
| 109 | AC_DEFINE([_TANDEM_SOURCE]) | 139 | AC_DEFINE([_TANDEM_SOURCE]) |
| 110 | AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], | 140 | AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], |
| 111 | [ac_cv_should_define__xopen_source], | 141 | [ac_cv_should_define__xopen_source], |
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 5fc667c3520..5a660c53751 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 | |||
| @@ -99,6 +99,7 @@ AC_DEFUN([gl_EARLY], | |||
| 99 | # Code from module inttypes-incomplete: | 99 | # Code from module inttypes-incomplete: |
| 100 | # Code from module largefile: | 100 | # Code from module largefile: |
| 101 | AC_REQUIRE([AC_SYS_LARGEFILE]) | 101 | AC_REQUIRE([AC_SYS_LARGEFILE]) |
| 102 | # Code from module limits-h: | ||
| 102 | # Code from module lstat: | 103 | # Code from module lstat: |
| 103 | # Code from module manywarnings: | 104 | # Code from module manywarnings: |
| 104 | # Code from module memrchr: | 105 | # Code from module memrchr: |
| @@ -283,6 +284,7 @@ AC_DEFUN([gl_INIT], | |||
| 283 | gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) | 284 | gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) |
| 284 | gl_INTTYPES_INCOMPLETE | 285 | gl_INTTYPES_INCOMPLETE |
| 285 | AC_REQUIRE([gl_LARGEFILE]) | 286 | AC_REQUIRE([gl_LARGEFILE]) |
| 287 | gl_LIMITS_H | ||
| 286 | gl_FUNC_LSTAT | 288 | gl_FUNC_LSTAT |
| 287 | if test $REPLACE_LSTAT = 1; then | 289 | if test $REPLACE_LSTAT = 1; then |
| 288 | AC_LIBOBJ([lstat]) | 290 | AC_LIBOBJ([lstat]) |
| @@ -928,6 +930,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 928 | lib/ignore-value.h | 930 | lib/ignore-value.h |
| 929 | lib/intprops.h | 931 | lib/intprops.h |
| 930 | lib/inttypes.in.h | 932 | lib/inttypes.in.h |
| 933 | lib/limits.in.h | ||
| 931 | lib/lstat.c | 934 | lib/lstat.c |
| 932 | lib/md5.c | 935 | lib/md5.c |
| 933 | lib/md5.h | 936 | lib/md5.h |
| @@ -1043,6 +1046,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 1043 | m4/include_next.m4 | 1046 | m4/include_next.m4 |
| 1044 | m4/inttypes.m4 | 1047 | m4/inttypes.m4 |
| 1045 | m4/largefile.m4 | 1048 | m4/largefile.m4 |
| 1049 | m4/limits-h.m4 | ||
| 1046 | m4/longlong.m4 | 1050 | m4/longlong.m4 |
| 1047 | m4/lstat.m4 | 1051 | m4/lstat.m4 |
| 1048 | m4/manywarnings.m4 | 1052 | m4/manywarnings.m4 |
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4 new file mode 100644 index 00000000000..913078689ba --- /dev/null +++ b/m4/limits-h.m4 | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | dnl Check whether limits.h has needed features. | ||
| 2 | |||
| 3 | dnl Copyright 2016 Free Software Foundation, Inc. | ||
| 4 | dnl This file is free software; the Free Software Foundation | ||
| 5 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 6 | dnl with or without modifications, as long as this notice is preserved. | ||
| 7 | |||
| 8 | dnl From Paul Eggert. | ||
| 9 | |||
| 10 | AC_DEFUN_ONCE([gl_LIMITS_H], | ||
| 11 | [ | ||
| 12 | gl_CHECK_NEXT_HEADERS([limits.h]) | ||
| 13 | |||
| 14 | AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.], | ||
| 15 | [gl_cv_header_limits_width], | ||
| 16 | [AC_COMPILE_IFELSE( | ||
| 17 | [AC_LANG_PROGRAM([[#define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | ||
| 18 | #include <limits.h> | ||
| 19 | int ullw = ULLONG_WIDTH;]])], | ||
| 20 | [gl_cv_header_limits_width=yes], | ||
| 21 | [gl_cv_header_limits_width=no])]) | ||
| 22 | if test "$gl_cv_header_limits_width" = yes; then | ||
| 23 | LIMITS_H= | ||
| 24 | else | ||
| 25 | LIMITS_H=limits.h | ||
| 26 | fi | ||
| 27 | AC_SUBST([LIMITS_H]) | ||
| 28 | AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) | ||
| 29 | ]) | ||
diff --git a/m4/stdint.m4 b/m4/stdint.m4 index 0b4b9060dbb..52f7814ef84 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # stdint.m4 serial 44 | 1 | # stdint.m4 serial 45 |
| 2 | dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -11,6 +11,8 @@ AC_DEFUN_ONCE([gl_STDINT_H], | |||
| 11 | [ | 11 | [ |
| 12 | AC_PREREQ([2.59])dnl | 12 | AC_PREREQ([2.59])dnl |
| 13 | 13 | ||
| 14 | AC_REQUIRE([gl_LIMITS_H]) | ||
| 15 | |||
| 14 | dnl Check for long long int and unsigned long long int. | 16 | dnl Check for long long int and unsigned long long int. |
| 15 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | 17 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) |
| 16 | if test $ac_cv_type_long_long_int = yes; then | 18 | if test $ac_cv_type_long_long_int = yes; then |
| @@ -282,14 +284,20 @@ static const char *macro_values[] = | |||
| 282 | ]) | 284 | ]) |
| 283 | ]) | 285 | ]) |
| 284 | fi | 286 | fi |
| 287 | |||
| 288 | HAVE_C99_STDINT_H=0 | ||
| 289 | HAVE_SYS_BITYPES_H=0 | ||
| 290 | HAVE_SYS_INTTYPES_H=0 | ||
| 291 | STDINT_H=stdint.h | ||
| 285 | if test "$gl_cv_header_working_stdint_h" = yes; then | 292 | if test "$gl_cv_header_working_stdint_h" = yes; then |
| 293 | HAVE_C99_STDINT_H=1 | ||
| 286 | dnl Now see whether the system <stdint.h> works without | 294 | dnl Now see whether the system <stdint.h> works without |
| 287 | dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. | 295 | dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. |
| 288 | AC_CACHE_CHECK([whether stdint.h predates C++11], | 296 | AC_CACHE_CHECK([whether stdint.h predates C++11], |
| 289 | [gl_cv_header_stdint_predates_cxx11_h], | 297 | [gl_cv_header_stdint_predates_cxx11_h], |
| 290 | [gl_cv_header_stdint_predates_cxx11_h=yes | 298 | [gl_cv_header_stdint_predates_cxx11_h=yes |
| 291 | AC_COMPILE_IFELSE([ | 299 | AC_COMPILE_IFELSE([ |
| 292 | AC_LANG_PROGRAM([[ | 300 | AC_LANG_PROGRAM([[ |
| 293 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | 301 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ |
| 294 | #include <stdint.h> | 302 | #include <stdint.h> |
| 295 | ] | 303 | ] |
| @@ -306,27 +314,40 @@ int32_t i32 = INT32_C (0x7fffffff); | |||
| 306 | AC_DEFINE([__STDC_LIMIT_MACROS], [1], | 314 | AC_DEFINE([__STDC_LIMIT_MACROS], [1], |
| 307 | [Define to 1 if the system <stdint.h> predates C++11.]) | 315 | [Define to 1 if the system <stdint.h> predates C++11.]) |
| 308 | fi | 316 | fi |
| 309 | STDINT_H= | 317 | AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], |
| 318 | [gl_cv_header_stdint_width], | ||
| 319 | [gl_cv_header_stdint_width=no | ||
| 320 | AC_COMPILE_IFELSE( | ||
| 321 | [AC_LANG_PROGRAM([[ | ||
| 322 | /* Work if build is not clean. */ | ||
| 323 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 | ||
| 324 | #include <stdint.h> | ||
| 325 | ]gl_STDINT_INCLUDES[ | ||
| 326 | int iw = UINTMAX_WIDTH; | ||
| 327 | ]])], | ||
| 328 | [gl_cv_header_stdint_width=yes])]) | ||
| 329 | if test "$gl_cv_header_stdint_width" = yes; then | ||
| 330 | STDINT_H= | ||
| 331 | fi | ||
| 310 | else | 332 | else |
| 311 | dnl Check for <sys/inttypes.h>, and for | 333 | dnl Check for <sys/inttypes.h>, and for |
| 312 | dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5). | 334 | dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5). |
| 313 | AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) | 335 | AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) |
| 314 | if test $ac_cv_header_sys_inttypes_h = yes; then | 336 | if test $ac_cv_header_sys_inttypes_h = yes; then |
| 315 | HAVE_SYS_INTTYPES_H=1 | 337 | HAVE_SYS_INTTYPES_H=1 |
| 316 | else | ||
| 317 | HAVE_SYS_INTTYPES_H=0 | ||
| 318 | fi | 338 | fi |
| 319 | AC_SUBST([HAVE_SYS_INTTYPES_H]) | ||
| 320 | if test $ac_cv_header_sys_bitypes_h = yes; then | 339 | if test $ac_cv_header_sys_bitypes_h = yes; then |
| 321 | HAVE_SYS_BITYPES_H=1 | 340 | HAVE_SYS_BITYPES_H=1 |
| 322 | else | ||
| 323 | HAVE_SYS_BITYPES_H=0 | ||
| 324 | fi | 341 | fi |
| 325 | AC_SUBST([HAVE_SYS_BITYPES_H]) | ||
| 326 | |||
| 327 | gl_STDINT_TYPE_PROPERTIES | 342 | gl_STDINT_TYPE_PROPERTIES |
| 328 | STDINT_H=stdint.h | ||
| 329 | fi | 343 | fi |
| 344 | |||
| 345 | # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. | ||
| 346 | test -z "$STDINT_H" || LIMITS_H=limits.h | ||
| 347 | |||
| 348 | AC_SUBST([HAVE_C99_STDINT_H]) | ||
| 349 | AC_SUBST([HAVE_SYS_BITYPES_H]) | ||
| 350 | AC_SUBST([HAVE_SYS_INTTYPES_H]) | ||
| 330 | AC_SUBST([STDINT_H]) | 351 | AC_SUBST([STDINT_H]) |
| 331 | AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) | 352 | AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) |
| 332 | ]) | 353 | ]) |
| @@ -504,8 +525,3 @@ dnl Remove this when we can assume autoconf >= 2.61. | |||
| 504 | m4_ifdef([AC_COMPUTE_INT], [], [ | 525 | m4_ifdef([AC_COMPUTE_INT], [], [ |
| 505 | AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) | 526 | AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) |
| 506 | ]) | 527 | ]) |
| 507 | |||
| 508 | # Hey Emacs! | ||
| 509 | # Local Variables: | ||
| 510 | # indent-tabs-mode: nil | ||
| 511 | # End: | ||
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 0e387585d27..5149981a804 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # stdio_h.m4 serial 46 | 1 | # stdio_h.m4 serial 47 |
| 2 | dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -6,9 +6,7 @@ dnl with or without modifications, as long as this notice is preserved. | |||
| 6 | 6 | ||
| 7 | AC_DEFUN([gl_STDIO_H], | 7 | AC_DEFUN([gl_STDIO_H], |
| 8 | [ | 8 | [ |
| 9 | dnl For __USE_MINGW_ANSI_STDIO | 9 | AC_DEFINE([__USE_MINGW_ANSI_STDIO], 1, [Use GNU style printf and scanf.]) |
| 10 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | ||
| 11 | |||
| 12 | AC_REQUIRE([gl_STDIO_H_DEFAULTS]) | 10 | AC_REQUIRE([gl_STDIO_H_DEFAULTS]) |
| 13 | gl_NEXT_HEADERS([stdio.h]) | 11 | gl_NEXT_HEADERS([stdio.h]) |
| 14 | 12 | ||
diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4 index b0aabb47862..159b005b3d4 100644 --- a/m4/sys_types_h.m4 +++ b/m4/sys_types_h.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # sys_types_h.m4 serial 5 | 1 | # sys_types_h.m4 serial 6 |
| 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -22,3 +22,28 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H], | |||
| 22 | AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], | 22 | AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], |
| 23 | [ | 23 | [ |
| 24 | ]) | 24 | ]) |
| 25 | |||
| 26 | # This works around a buggy version in autoconf <= 2.69. | ||
| 27 | # See <https://lists.gnu.org/archive/html/autoconf/2016-08/msg00014.html> | ||
| 28 | |||
| 29 | m4_version_prereq([2.70], [], [ | ||
| 30 | |||
| 31 | # This is taken from the following Autoconf patch: | ||
| 32 | # http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98 | ||
| 33 | |||
| 34 | m4_undefine([AC_HEADER_MAJOR]) | ||
| 35 | AC_DEFUN([AC_HEADER_MAJOR], | ||
| 36 | [AC_CHECK_HEADERS_ONCE([sys/types.h]) | ||
| 37 | AC_CHECK_HEADER([sys/mkdev.h], | ||
| 38 | [AC_DEFINE([MAJOR_IN_MKDEV], [1], | ||
| 39 | [Define to 1 if `major', `minor', and `makedev' are declared in | ||
| 40 | <mkdev.h>.])]) | ||
| 41 | if test $ac_cv_header_sys_mkdev_h = no; then | ||
| 42 | AC_CHECK_HEADER([sys/sysmacros.h], | ||
| 43 | [AC_DEFINE([MAJOR_IN_SYSMACROS], [1], | ||
| 44 | [Define to 1 if `major', `minor', and `makedev' are declared in | ||
| 45 | <sysmacros.h>.])]) | ||
| 46 | fi | ||
| 47 | ]) | ||
| 48 | |||
| 49 | ]) | ||