1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Merge from gnulib

This incorporates:
2017-07-13 Improve cross-compilation guesses for native Windows
2017-07-11 More systematic m4 quoting and indentation
2017-07-10 Make sure $host and $host_os are defined when used
2017-07-03 stdioext: Port to OpenVMS
2017-06-24 xalloc-oversized: port to icc
* doc/misc/texinfo.tex, lib/fpending.c, lib/stdio-impl.h:
* lib/xalloc-oversized.h, m4/dirfd.m4, m4/gettimeofday.m4:
* m4/lstat.m4, m4/mktime.m4, m4/pselect.m4, m4/putenv.m4:
* m4/stdint.m4, m4/strtoimax.m4, m4/utimes.m4:
Copy from Gnulib.
This commit is contained in:
Paul Eggert 2017-07-13 19:24:06 -07:00
parent ab87dbad1d
commit 3128d5d10e
13 changed files with 113 additions and 89 deletions

View file

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex. % Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
% %
\def\texinfoversion{2017-06-04.19} \def\texinfoversion{2017-07-04.16}
% %
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@ -11009,7 +11009,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2113}{\ensuremath\ell}% \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
\DeclareUnicodeCharacter{2118}{\ensuremath\wp}% \DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
\DeclareUnicodeCharacter{211C}{\ensuremath\Re}% \DeclareUnicodeCharacter{211C}{\ensuremath\Re}%
\DeclareUnicodeCharacter{2127}{\ensuremath\mho}%
\DeclareUnicodeCharacter{2135}{\ensuremath\aleph}% \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
\DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}% \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
\DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}% \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
@ -11025,7 +11024,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}% \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}%
\DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}% \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}%
\DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}% \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}%
\DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright}%
\DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}% \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}%
\DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}% \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}%
\DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}% \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}%
@ -11034,8 +11032,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}% \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}%
\DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}% \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}%
\DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}% \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}%
\DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto}%
\DeclareUnicodeCharacter{2201}{\ensuremath\complement}%
\DeclareUnicodeCharacter{2202}{\ensuremath\partial}% \DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
\DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}% \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
\DeclareUnicodeCharacter{2207}{\ensuremath\nabla}% \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
@ -11069,8 +11065,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2283}{\ensuremath\supset}% \DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
\DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}% \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
\DeclareUnicodeCharacter{228E}{\ensuremath\uplus}% \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}%
\DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset}%
\DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}%
\DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}% \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
\DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}% \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
\DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}% \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
@ -11085,8 +11079,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}% \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}%
\DeclareUnicodeCharacter{22A5}{\ensuremath\bot}% \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}%
\DeclareUnicodeCharacter{22A8}{\ensuremath\models}% \DeclareUnicodeCharacter{22A8}{\ensuremath\models}%
\DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd}%
\DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd}%
\DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}% \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}%
\DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}% \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}%
\DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}% \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}%
@ -11102,12 +11094,11 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2322}{\ensuremath\frown}% \DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
\DeclareUnicodeCharacter{2323}{\ensuremath\smile}% \DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
% %
\DeclareUnicodeCharacter{25A1}{\ensuremath\Box}%
\DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}% \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}%
\DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}% \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}%
\DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}% \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}%
\DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}% \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}%
\DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond}% \DeclareUnicodeCharacter{25C7}{\ensuremath\diamond}%
\DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}% \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
\DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}% \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
\DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}% \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
@ -11129,7 +11120,6 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}% \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}%
\DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}% \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}%
\DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}% \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}%
\DeclareUnicodeCharacter{2A1D}{\ensuremath\Join}%
\DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}% \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}%
\DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}% \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}%
\DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}% \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}%

View file

@ -41,7 +41,7 @@ __fpending (FILE *fp)
return fp->_ptr - fp->_buffer; return fp->_ptr - fp->_buffer;
#elif defined __minix /* Minix */ #elif defined __minix /* Minix */
return fp_->_ptr - fp_->_buf; return fp_->_ptr - fp_->_buf;
#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */ #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0); return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0);
#elif defined __UCLIBC__ /* uClibc */ #elif defined __UCLIBC__ /* uClibc */
return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0); return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0);
@ -51,8 +51,6 @@ __fpending (FILE *fp)
return fp->__bufp - fp->__buffer; return fp->__bufp - fp->__buffer;
#elif defined EPLAN9 /* Plan9 */ #elif defined EPLAN9 /* Plan9 */
return fp->wp - fp->buf; return fp->wp - fp->buf;
#elif defined __VMS /* VMS */
return (*fp)->_ptr - (*fp)->_base;
#else #else
# error "Please port gnulib fpending.c to your platform!" # error "Please port gnulib fpending.c to your platform!"
return 1; return 1;

View file

@ -99,6 +99,8 @@
int _file; \ int _file; \
unsigned int _flag; \ unsigned int _flag; \
} *) fp) } *) fp)
# elif defined __VMS /* OpenVMS */
# define fp_ ((struct _iobuf *) fp)
# else # else
# define fp_ fp # define fp_ fp
# endif # endif

View file

@ -44,7 +44,7 @@ typedef size_t __xalloc_count_type;
#if 7 <= __GNUC__ #if 7 <= __GNUC__
# define xalloc_oversized(n, s) \ # define xalloc_oversized(n, s) \
__builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
#elif 5 <= __GNUC__ && !__STRICT_ANSI__ #elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__
# define xalloc_oversized(n, s) \ # define xalloc_oversized(n, s) \
(__builtin_constant_p (n) && __builtin_constant_p (s) \ (__builtin_constant_p (n) && __builtin_constant_p (s) \
? __xalloc_oversized (n, s) \ ? __xalloc_oversized (n, s) \

View file

@ -1,4 +1,4 @@
# serial 24 -*- Autoconf -*- # serial 26 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*. dnl Find out how to get the file descriptor associated with an open DIR*.
@ -12,6 +12,7 @@ dnl From Jim Meyering
AC_DEFUN([gl_FUNC_DIRFD], AC_DEFUN([gl_FUNC_DIRFD],
[ [
AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Persuade glibc <dirent.h> to declare dirfd(). dnl Persuade glibc <dirent.h> to declare dirfd().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@ -25,15 +26,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
fi fi
AC_CACHE_CHECK([whether dirfd is a macro], AC_CACHE_CHECK([whether dirfd is a macro],
gl_cv_func_dirfd_macro, [gl_cv_func_dirfd_macro],
[AC_EGREP_CPP([dirent_header_defines_dirfd], [ [AC_EGREP_CPP([dirent_header_defines_dirfd], [
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#ifdef dirfd #ifdef dirfd
dirent_header_defines_dirfd dirent_header_defines_dirfd
#endif], #endif],
gl_cv_func_dirfd_macro=yes, [gl_cv_func_dirfd_macro=yes],
gl_cv_func_dirfd_macro=no)]) [gl_cv_func_dirfd_macro=no])])
# Use the replacement if we have no function or macro with that name, # Use the replacement if we have no function or macro with that name,
# or if OS/2 kLIBC whose dirfd() does not work. # or if OS/2 kLIBC whose dirfd() does not work.

View file

@ -1,4 +1,4 @@
# serial 23 # serial 24
# Copyright (C) 2001-2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc. # Copyright (C) 2001-2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
@ -105,6 +105,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
case "$host_os" in case "$host_os" in
# Guess all is fine on glibc systems. # Guess all is fine on glibc systems.
*-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# If we don't know, assume the worst. # If we don't know, assume the worst.
*) gl_cv_func_gettimeofday_clobber="guessing yes" ;; *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
esac esac

View file

@ -1,4 +1,4 @@
# serial 27 # serial 29
# Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc. # Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc.
# #
@ -33,6 +33,7 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[ [
dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ. dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether lstat correctly handles trailing slash], AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
[gl_cv_func_lstat_dereferences_slashed_symlink], [gl_cv_func_lstat_dereferences_slashed_symlink],
[rm -f conftest.sym conftest.file [rm -f conftest.sym conftest.file
@ -54,6 +55,9 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
*-gnu*) *-gnu*)
# Guess yes on glibc systems. # Guess yes on glibc systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
mingw*)
# Guess no on native Windows.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
*) *)
# If we don't know, assume the worst. # If we don't know, assume the worst.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;

View file

@ -1,4 +1,4 @@
# serial 28 # serial 29
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation,
dnl Inc. dnl Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
@ -25,6 +25,7 @@ dnl Test whether mktime works. Set gl_cv_func_working_mktime.
AC_DEFUN([gl_FUNC_MKTIME_WORKS], AC_DEFUN([gl_FUNC_MKTIME_WORKS],
[ [
AC_REQUIRE([gl_TIME_T_IS_SIGNED]) AC_REQUIRE([gl_TIME_T_IS_SIGNED])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl We don't use AC_FUNC_MKTIME any more, because it is no longer maintained dnl We don't use AC_FUNC_MKTIME any more, because it is no longer maintained
dnl in Autoconf and because it invokes AC_LIBOBJ. dnl in Autoconf and because it invokes AC_LIBOBJ.
@ -239,7 +240,12 @@ main ()
}]])], }]])],
[gl_cv_func_working_mktime=yes], [gl_cv_func_working_mktime=yes],
[gl_cv_func_working_mktime=no], [gl_cv_func_working_mktime=no],
[gl_cv_func_working_mktime="guessing no"]) [case "$host_os" in
# Guess no on native Windows.
mingw*) gl_cv_func_working_mktime="guessing no" ;;
*) gl_cv_func_working_mktime="guessing no" ;;
esac
])
]) ])
]) ])

View file

@ -1,4 +1,4 @@
# pselect.m4 serial 2 # pselect.m4 serial 4
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -8,11 +8,12 @@ AC_DEFUN([gl_FUNC_PSELECT],
[ [
AC_REQUIRE([gl_HEADER_SYS_SELECT]) AC_REQUIRE([gl_HEADER_SYS_SELECT])
AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([pselect]) AC_CHECK_FUNCS_ONCE([pselect])
if test $ac_cv_func_pselect = yes; then if test $ac_cv_func_pselect = yes; then
AC_CACHE_CHECK([whether signature of pselect conforms to POSIX], AC_CACHE_CHECK([whether signature of pselect conforms to POSIX],
gl_cv_sig_pselect, [gl_cv_sig_pselect],
[AC_LINK_IFELSE( [AC_LINK_IFELSE(
[AC_LANG_PROGRAM( [AC_LANG_PROGRAM(
[[#include <sys/select.h> [[#include <sys/select.h>

View file

@ -1,4 +1,4 @@
# putenv.m4 serial 20 # putenv.m4 serial 21
dnl Copyright (C) 2002-2017 Free Software Foundation, Inc. dnl Copyright (C) 2002-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -36,6 +36,8 @@ AC_DEFUN([gl_FUNC_PUTENV],
[case "$host_os" in [case "$host_os" in
# Guess yes on glibc systems. # Guess yes on glibc systems.
*-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_svid_putenv="guessing no" ;;
# If we don't know, assume the worst. # If we don't know, assume the worst.
*) gl_cv_func_svid_putenv="guessing no" ;; *) gl_cv_func_svid_putenv="guessing no" ;;
esac esac

View file

@ -1,4 +1,4 @@
# stdint.m4 serial 50 # stdint.m4 serial 51
dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. dnl Copyright (C) 2001-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -10,6 +10,7 @@ dnl Test whether <stdint.h> is supported or must be substituted.
AC_DEFUN_ONCE([gl_STDINT_H], AC_DEFUN_ONCE([gl_STDINT_H],
[ [
AC_PREREQ([2.59])dnl AC_PREREQ([2.59])dnl
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_LIMITS_H]) AC_REQUIRE([gl_LIMITS_H])
AC_REQUIRE([gt_TYPE_WINT_T]) AC_REQUIRE([gt_TYPE_WINT_T])
@ -288,8 +289,12 @@ static const char *macro_values[] =
]])], ]])],
[gl_cv_header_working_stdint_h=yes], [gl_cv_header_working_stdint_h=yes],
[], [],
[dnl When cross-compiling, assume it works. [case "$host_os" in
gl_cv_header_working_stdint_h=yes # Guess yes on native Windows.
mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
# In general, assume it works.
*) gl_cv_header_working_stdint_h="guessing yes" ;;
esac
]) ])
]) ])
]) ])
@ -299,7 +304,8 @@ static const char *macro_values[] =
HAVE_SYS_BITYPES_H=0 HAVE_SYS_BITYPES_H=0
HAVE_SYS_INTTYPES_H=0 HAVE_SYS_INTTYPES_H=0
STDINT_H=stdint.h STDINT_H=stdint.h
if test "$gl_cv_header_working_stdint_h" = yes; then case "$gl_cv_header_working_stdint_h" in
*yes)
HAVE_C99_STDINT_H=1 HAVE_C99_STDINT_H=1
dnl Now see whether the system <stdint.h> works without dnl Now see whether the system <stdint.h> works without
dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
@ -342,7 +348,8 @@ int32_t i32 = INT32_C (0x7fffffff);
if test "$gl_cv_header_stdint_width" = yes; then if test "$gl_cv_header_stdint_width" = yes; then
STDINT_H= STDINT_H=
fi fi
else ;;
*)
dnl Check for <sys/inttypes.h>, and for dnl Check for <sys/inttypes.h>, and for
dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5). dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
@ -353,7 +360,8 @@ int32_t i32 = INT32_C (0x7fffffff);
HAVE_SYS_BITYPES_H=1 HAVE_SYS_BITYPES_H=1
fi fi
gl_STDINT_TYPE_PROPERTIES gl_STDINT_TYPE_PROPERTIES
fi ;;
esac
dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
LIMITS_H=limits.h LIMITS_H=limits.h

View file

@ -1,4 +1,4 @@
# strtoimax.m4 serial 14 # strtoimax.m4 serial 15
dnl Copyright (C) 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc. dnl Copyright (C) 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -63,6 +63,8 @@ int main ()
[case "$host_os" in [case "$host_os" in
# Guess no on AIX 5. # Guess no on AIX 5.
aix5*) gl_cv_func_strtoimax="guessing no" ;; aix5*) gl_cv_func_strtoimax="guessing no" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_strtoimax="guessing yes" ;;
# Guess yes otherwise. # Guess yes otherwise.
*) gl_cv_func_strtoimax="guessing yes" ;; *) gl_cv_func_strtoimax="guessing yes" ;;
esac esac

View file

@ -1,5 +1,5 @@
# Detect some bugs in glibc's implementation of utimes. # Detect some bugs in glibc's implementation of utimes.
# serial 4 # serial 5
dnl Copyright (C) 2003-2005, 2009-2017 Free Software Foundation, Inc. dnl Copyright (C) 2003-2005, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
@ -20,10 +20,10 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_UTIMES], AC_DEFUN([gl_FUNC_UTIMES],
[ [
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether the utimes function works], AC_CACHE_CHECK([whether the utimes function works],
[gl_cv_func_working_utimes], [gl_cv_func_working_utimes],
[ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
@ -142,9 +142,17 @@ main ()
]])], ]])],
[gl_cv_func_working_utimes=yes], [gl_cv_func_working_utimes=yes],
[gl_cv_func_working_utimes=no], [gl_cv_func_working_utimes=no],
[gl_cv_func_working_utimes=no])]) [case "$host_os" in
# Guess no on native Windows.
if test $gl_cv_func_working_utimes = yes; then mingw*) gl_cv_func_working_utimes="guessing no" ;;
AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly.]) *) gl_cv_func_working_utimes="guessing no" ;;
fi esac
])
])
case "$gl_cv_func_working_utimes" in
*yes)
AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly.])
;;
esac
]) ])