mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
Update from Gnulib
This incorporates: 2020-07-30 work around some Oracle Studio attribute bugs 2020-07-29 fsusage, regex, stat-size: remove Cray support 2020-07-26 inttypes: remove support for AIX 4 2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0 2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS 2020-07-26 alloca: remove Cray-2 and Cray Y-MP support 2020-07-26 libgmp: remove dependency on havelib 2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP 2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11 2020-07-25 sigprocmask: small autoconf macro improvement 2020-07-25 small autoconf macro improvements 2020-07-24 timespec: remove dependence on ‘verify’ 2020-07-24 optimize a few more three-valued comparisons 2020-07-24 fix _GL_CMP parenthesization typo 2020-07-23 optimize three-valued comparison between integers 2020-07-24 doc: update for Mac OS X 10.13 2020-07-23 fchmodat, lchmod: use /proc on Cygwin 2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows 2020-07-12 libgmp: avoid warning when --without-libgmp is used 2020-07-12 libgmp: link to the correct shared library * lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for * build-aux/config.guess, build-aux/config.sub: * build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c: * lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c: * lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c: * lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h: * m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4: * m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4: * m4/multiarch.m4: Copy from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * src/Makefile.in, test/Makefile.in (LIBGMP): Rename from LIB_GMP for compatibility with Gnulib. All uses changed.
This commit is contained in:
parent
88b4516cf8
commit
5d89a9c284
5
build-aux/config.guess
vendored
5
build-aux/config.guess
vendored
@ -2,7 +2,7 @@
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2020-04-26'
|
||||
timestamp='2020-07-12'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -1342,6 +1342,9 @@ EOF
|
||||
*:Rhapsody:*:*)
|
||||
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
arm64:Darwin:*:*)
|
||||
echo aarch64-apple-darwin"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
case $UNAME_PROCESSOR in
|
||||
|
7
build-aux/config.sub
vendored
7
build-aux/config.sub
vendored
@ -2,7 +2,7 @@
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2020-06-28'
|
||||
timestamp='2020-07-10'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -1104,6 +1104,9 @@ case $cpu-$vendor in
|
||||
xscale-* | xscalee[bl]-*)
|
||||
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
|
||||
;;
|
||||
arm64-*)
|
||||
cpu=aarch64
|
||||
;;
|
||||
|
||||
# Recognize the canonical CPU Types that limit and/or modify the
|
||||
# company names they are paired with.
|
||||
@ -1163,7 +1166,7 @@ case $cpu-$vendor in
|
||||
| am33_2.0 \
|
||||
| amdgcn \
|
||||
| arc | arceb \
|
||||
| arm | arm[lb]e | arme[lb] | armv* \
|
||||
| arm | arm[lb]e | arme[lb] | armv* \
|
||||
| avr | avr32 \
|
||||
| asmjs \
|
||||
| ba \
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2018-03-11.20; # UTC
|
||||
scriptversion=2020-07-26.22; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@ -69,6 +69,10 @@ posix_mkdir=
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
@ -301,22 +305,6 @@ do
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
@ -326,52 +314,49 @@ do
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# Note that $RANDOM variable is not portable (e.g. dash); Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
trap '
|
||||
ret=$?
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
||||
exit $ret
|
||||
' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p' feature.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p'.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac
|
||||
|
||||
if
|
||||
@ -382,7 +367,7 @@ do
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
@ -411,7 +396,7 @@ do
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
|
@ -3,7 +3,7 @@
|
||||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2020-05-22.11}
|
||||
\def\texinfoversion{2020-06-25.17}
|
||||
%
|
||||
% Copyright 1985, 1986, 1988, 1990-2020 Free Software Foundation, Inc.
|
||||
%
|
||||
@ -4922,7 +4922,7 @@
|
||||
|
||||
% like the previous two, but they put @code around the argument.
|
||||
\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
|
||||
\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
|
||||
\def\docodeindexxxx #1{\docind{\indexname}{#1}}
|
||||
|
||||
|
||||
% Used for the aux, toc and index files to prevent expansion of Texinfo
|
||||
@ -5294,6 +5294,20 @@
|
||||
\fi
|
||||
}
|
||||
|
||||
% Same as \doind, but for code indices
|
||||
\def\docind#1#2{%
|
||||
\iflinks
|
||||
{%
|
||||
%
|
||||
\requireopenindexfile{#1}%
|
||||
\edef\writeto{\csname#1indfile\endcsname}%
|
||||
%
|
||||
\def\indextext{#2}%
|
||||
\safewhatsit\docindwrite
|
||||
}%
|
||||
\fi
|
||||
}
|
||||
|
||||
% Check if an index file has been opened, and if not, open it.
|
||||
\def\requireopenindexfile#1{%
|
||||
\ifnum\csname #1indfile\endcsname=0
|
||||
@ -5360,6 +5374,9 @@
|
||||
% trim spaces.
|
||||
\edef\trimmed{\segment}%
|
||||
\edef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
|
||||
\ifincodeindex
|
||||
\edef\trimmed{\noexpand\code{\trimmed}}%
|
||||
\fi
|
||||
%
|
||||
\xdef\bracedtext{\bracedtext{\trimmed}}%
|
||||
%
|
||||
@ -5425,7 +5442,12 @@
|
||||
|
||||
% Write the entry in \indextext to the index file.
|
||||
%
|
||||
\def\doindwrite{%
|
||||
|
||||
\newif\ifincodeindex
|
||||
\def\doindwrite{\incodeindexfalse\doindwritex}
|
||||
\def\docindwrite{\incodeindextrue\doindwritex}
|
||||
|
||||
\def\doindwritex{%
|
||||
\maybemarginindex
|
||||
%
|
||||
\atdummies
|
||||
@ -5645,7 +5667,11 @@
|
||||
\else
|
||||
\begindoublecolumns
|
||||
\catcode`\\=0\relax
|
||||
\catcode`\@=12\relax
|
||||
%
|
||||
% Make @ an escape character to give macros a chance to work. This
|
||||
% should work because we (hopefully) don't otherwise use @ in index files.
|
||||
%\catcode`\@=12\relax
|
||||
\catcode`\@=0\relax
|
||||
\input \jobname.\indexname s
|
||||
\enddoublecolumns
|
||||
\fi
|
||||
@ -7562,7 +7588,7 @@
|
||||
\let\nonarrowing = t%
|
||||
\nonfillstart
|
||||
\tt % easiest (and conventionally used) font for verbatim
|
||||
\def\par{\egroup\box\verbbox\endgraf\starttabbox}%
|
||||
\def\par{\egroup\leavevmode\box\verbbox\endgraf\starttabbox}%
|
||||
\tabexpand
|
||||
\setupmarkupstyle{verbatim}%
|
||||
% Respect line breaks,
|
||||
|
@ -52,5 +52,5 @@ c_strcasecmp (const char *s1, const char *s2)
|
||||
/* On machines where 'char' and 'int' are types of the same size, the
|
||||
difference of two 'unsigned char' values - including the sign bit -
|
||||
doesn't fit in an 'int'. */
|
||||
return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
|
||||
return _GL_CMP (c1, c2);
|
||||
}
|
||||
|
@ -52,5 +52,5 @@ c_strncasecmp (const char *s1, const char *s2, size_t n)
|
||||
/* On machines where 'char' and 'int' are types of the same size, the
|
||||
difference of two 'unsigned char' values - including the sign bit -
|
||||
doesn't fit in an 'int'. */
|
||||
return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
|
||||
return _GL_CMP (c1, c2);
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ fchmodat (int dir, char const *file, mode_t mode, int flags)
|
||||
return -1;
|
||||
}
|
||||
|
||||
# if defined __linux__ || defined __ANDROID__
|
||||
# if defined __linux__ || defined __ANDROID__ || defined __CYGWIN__
|
||||
static char const fmt[] = "/proc/self/fd/%d";
|
||||
char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
|
||||
sprintf (buf, fmt, fd);
|
||||
|
@ -211,11 +211,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
|
||||
/* Empirically, the block counts on most SVR3 and SVR3-derived
|
||||
systems seem to always be in terms of 512-byte blocks,
|
||||
no matter what value f_bsize has. */
|
||||
# if defined _CRAY
|
||||
fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_bsize);
|
||||
# else
|
||||
fsp->fsu_blocksize = 512;
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -29,8 +29,6 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "localtime-buffer.h"
|
||||
|
||||
#ifdef WINDOWS_NATIVE
|
||||
|
||||
/* Don't assume that UNICODE is not defined. */
|
||||
@ -123,11 +121,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
|
||||
#else
|
||||
|
||||
# if HAVE_GETTIMEOFDAY
|
||||
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
|
||||
/* Save and restore the contents of the buffer used for localtime's
|
||||
result around the call to gettimeofday. */
|
||||
struct tm save = *localtime_buffer_addr;
|
||||
# endif
|
||||
|
||||
# if defined timeval /* 'struct timeval' overridden by gnulib? */
|
||||
# undef timeval
|
||||
@ -142,10 +135,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
|
||||
int result = gettimeofday (tv, (struct timezone *) tz);
|
||||
# endif
|
||||
|
||||
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
|
||||
*localtime_buffer_addr = save;
|
||||
# endif
|
||||
|
||||
return result;
|
||||
|
||||
# else
|
||||
|
@ -587,6 +587,7 @@ HAVE_INITSTATE = @HAVE_INITSTATE@
|
||||
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
|
||||
HAVE_LCHMOD = @HAVE_LCHMOD@
|
||||
HAVE_LCHOWN = @HAVE_LCHOWN@
|
||||
HAVE_LIBGMP = @HAVE_LIBGMP@
|
||||
HAVE_LINK = @HAVE_LINK@
|
||||
HAVE_LINKAT = @HAVE_LINKAT@
|
||||
HAVE_LSTAT = @HAVE_LSTAT@
|
||||
@ -721,6 +722,7 @@ LD_SWITCH_SYSTEM_TEMACS = @LD_SWITCH_SYSTEM_TEMACS@
|
||||
LD_SWITCH_X_SITE = @LD_SWITCH_X_SITE@
|
||||
LD_SWITCH_X_SITE_RPATH = @LD_SWITCH_X_SITE_RPATH@
|
||||
LIBGIF = @LIBGIF@
|
||||
LIBGMP = @LIBGMP@
|
||||
LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@
|
||||
LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@
|
||||
LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
|
||||
@ -761,7 +763,6 @@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_EACCESS = @LIB_EACCESS@
|
||||
LIB_EXECINFO = @LIB_EXECINFO@
|
||||
LIB_GETRANDOM = @LIB_GETRANDOM@
|
||||
LIB_GMP = @LIB_GMP@
|
||||
LIB_MATH = @LIB_MATH@
|
||||
LIB_PTHREAD = @LIB_PTHREAD@
|
||||
LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
|
||||
@ -769,6 +770,7 @@ LIB_TIMER_TIME = @LIB_TIMER_TIME@
|
||||
LIB_WSOCK32 = @LIB_WSOCK32@
|
||||
LIMITS_H = @LIMITS_H@
|
||||
LN_S_FILEONLY = @LN_S_FILEONLY@
|
||||
LTLIBGMP = @LTLIBGMP@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
|
||||
@ -848,7 +850,6 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
|
||||
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
|
||||
PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@
|
||||
PRIPTR_PREFIX = @PRIPTR_PREFIX@
|
||||
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
|
||||
PROFILING_CFLAGS = @PROFILING_CFLAGS@
|
||||
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
|
||||
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
|
||||
@ -1963,7 +1964,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
|
||||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
|
||||
-e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
|
||||
-e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
|
||||
-e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
|
||||
-e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
|
||||
-e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
|
||||
@ -2069,19 +2069,6 @@ EXTRA_DIST += limits.in.h
|
||||
endif
|
||||
## end gnulib module limits-h
|
||||
|
||||
## begin gnulib module localtime-buffer
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_localtime-buffer))
|
||||
|
||||
ifneq (,$(gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9))
|
||||
|
||||
endif
|
||||
EXTRA_DIST += localtime-buffer.c localtime-buffer.h
|
||||
|
||||
EXTRA_libgnu_a_SOURCES += localtime-buffer.c
|
||||
|
||||
endif
|
||||
## end gnulib module localtime-buffer
|
||||
|
||||
## begin gnulib module lstat
|
||||
ifeq (,$(OMIT_GNULIB_MODULE_lstat))
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -76,7 +76,7 @@ lchmod (char const *file, mode_t mode)
|
||||
return -1;
|
||||
}
|
||||
|
||||
# if defined __linux__ || defined __ANDROID__
|
||||
# if defined __linux__ || defined __ANDROID__ || defined __CYGWIN__
|
||||
static char const fmt[] = "/proc/self/fd/%d";
|
||||
char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
|
||||
sprintf (buf, fmt, fd);
|
||||
|
@ -22,12 +22,14 @@
|
||||
|
||||
#include "mini-gmp.h"
|
||||
|
||||
/* Pacify GCC -Wsuggest-attribute=const, malloc, pure. */
|
||||
/* Pacify GCC -Wsuggest-attribute=const, pure, malloc. */
|
||||
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
|
||||
# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
|
||||
# pragma GCC diagnostic ignored "-Wsuggest-attribute=malloc"
|
||||
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
|
||||
#endif
|
||||
#if 8 <= __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wsuggest-attribute=malloc"
|
||||
#endif
|
||||
|
||||
/* Pacify GCC -Wunused-variable for variables used only in 'assert' calls. */
|
||||
#if defined NDEBUG && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
|
||||
|
@ -495,15 +495,6 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
|
||||
const char *format_end = NULL;
|
||||
#endif
|
||||
|
||||
#if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST
|
||||
/* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned
|
||||
by localtime. On such systems, we must either use the tzset and
|
||||
localtime wrappers to work around the bug (which sets
|
||||
HAVE_RUN_TZSET_TEST) or make a copy of the structure. */
|
||||
struct tm copy = *tp;
|
||||
tp = ©
|
||||
#endif
|
||||
|
||||
zone = NULL;
|
||||
#if HAVE_TM_ZONE
|
||||
/* The POSIX test suite assumes that setting
|
||||
|
@ -600,11 +600,9 @@ extern void re_set_registers (struct re_pattern_buffer *__buffer,
|
||||
#endif /* Use GNU */
|
||||
|
||||
#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_MISC)
|
||||
# ifndef _CRAY
|
||||
/* 4.2 bsd compatibility. */
|
||||
extern char *re_comp (const char *);
|
||||
extern int re_exec (const char *);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* For plain 'restrict', use glibc's __restrict if defined.
|
||||
|
@ -34,7 +34,6 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "arg-nonnull.h"
|
||||
#include "verify.h"
|
||||
|
||||
/* Inverse resolution of timespec timestamps (in units per second),
|
||||
and log base 10 of the inverse resolution. */
|
||||
@ -59,46 +58,12 @@ make_timespec (time_t s, long int ns)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
|
||||
|
||||
For each timestamp T, this code assumes that either:
|
||||
|
||||
* T.tv_nsec is in the range 0..999999999; or
|
||||
* T.tv_sec corresponds to a valid leap second on a host that supports
|
||||
leap seconds, and T.tv_nsec is in the range 1000000000..1999999999; or
|
||||
* T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or
|
||||
T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000.
|
||||
This allows for special struct timespec values that are less or
|
||||
greater than all possible valid timestamps.
|
||||
|
||||
In all these cases, it is safe to subtract two tv_nsec values and
|
||||
convert the result to integer without worrying about overflow on
|
||||
any platform of interest to the GNU project, since all such
|
||||
platforms have 32-bit int or wider.
|
||||
|
||||
Replacing "a.tv_nsec - b.tv_nsec" with something like
|
||||
"a.tv_nsec < b.tv_nsec ? -1 : a.tv_nsec > b.tv_nsec" would cause
|
||||
this function to work in some cases where the above assumption is
|
||||
violated, but not in all cases (e.g., a.tv_sec==1, a.tv_nsec==-2,
|
||||
b.tv_sec==0, b.tv_nsec==999999999) and is arguably not worth the
|
||||
extra instructions. Using a subtraction has the advantage of
|
||||
detecting some invalid cases on platforms that detect integer
|
||||
overflow. */
|
||||
/* Return negative, zero, positive if A < B, A == B, A > B, respectively. */
|
||||
|
||||
_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
|
||||
timespec_cmp (struct timespec a, struct timespec b)
|
||||
{
|
||||
if (a.tv_sec < b.tv_sec)
|
||||
return -1;
|
||||
if (a.tv_sec > b.tv_sec)
|
||||
return 1;
|
||||
|
||||
/* Pacify gcc -Wstrict-overflow (bleeding-edge circa 2017-10-02). See:
|
||||
https://lists.gnu.org/r/bug-gnulib/2017-10/msg00006.html */
|
||||
assume (-1 <= a.tv_nsec && a.tv_nsec <= 2 * TIMESPEC_HZ);
|
||||
assume (-1 <= b.tv_nsec && b.tv_nsec <= 2 * TIMESPEC_HZ);
|
||||
|
||||
return a.tv_nsec - b.tv_nsec;
|
||||
return 2 * _GL_CMP (a.tv_sec, b.tv_sec) + _GL_CMP (a.tv_nsec, b.tv_nsec);
|
||||
}
|
||||
|
||||
/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be
|
||||
@ -106,7 +71,7 @@ timespec_cmp (struct timespec a, struct timespec b)
|
||||
_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
|
||||
timespec_sign (struct timespec a)
|
||||
{
|
||||
return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
|
||||
return _GL_CMP (a.tv_sec, 0) + (!a.tv_sec & !!a.tv_nsec);
|
||||
}
|
||||
|
||||
struct timespec timespec_add (struct timespec, struct timespec)
|
||||
|
32
m4/alloca.m4
32
m4/alloca.m4
@ -1,4 +1,4 @@
|
||||
# alloca.m4 serial 15
|
||||
# alloca.m4 serial 16
|
||||
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
@ -51,12 +51,9 @@ AC_DEFUN([gl_FUNC_ALLOCA],
|
||||
AC_DEFUN([gl_PREREQ_ALLOCA], [:])
|
||||
|
||||
# This works around a bug in autoconf <= 2.68.
|
||||
# See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html>.
|
||||
|
||||
m4_version_prereq([2.69], [] ,[
|
||||
|
||||
# This is taken from the following Autoconf patch:
|
||||
# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497
|
||||
# See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html> and
|
||||
# <https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497>.
|
||||
# Also it has a simplification that is not yet in Autoconf.
|
||||
|
||||
# _AC_LIBOBJ_ALLOCA
|
||||
# -----------------
|
||||
@ -72,26 +69,6 @@ AC_LIBSOURCES(alloca.c)
|
||||
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
|
||||
AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
|
||||
|
||||
AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
|
||||
[AC_EGREP_CPP(webecray,
|
||||
[#if defined CRAY && ! defined CRAY2
|
||||
webecray
|
||||
#else
|
||||
wenotbecray
|
||||
#endif
|
||||
], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
|
||||
if test $ac_cv_os_cray = yes; then
|
||||
for ac_func in _getb67 GETB67 getb67; do
|
||||
AC_CHECK_FUNC($ac_func,
|
||||
[AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
|
||||
[Define to one of '_getb67', 'GETB67',
|
||||
'getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for
|
||||
'alloca.c' support on those systems.])
|
||||
break])
|
||||
done
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([stack direction for C alloca],
|
||||
[ac_cv_c_stack_direction],
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE(
|
||||
@ -124,5 +101,4 @@ AH_VERBATIM([STACK_DIRECTION],
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
@%:@undef STACK_DIRECTION])dnl
|
||||
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
|
||||
])# _AC_LIBOBJ_ALLOCA
|
||||
])
|
||||
|
@ -1,4 +1,4 @@
|
||||
# serial 23
|
||||
# serial 24
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl A wrapper around AC_FUNC_GETGROUPS.
|
||||
@ -79,7 +79,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS],
|
||||
AC_DEFINE([GETGROUPS_ZERO_BUG], [1], [Define this to 1 if
|
||||
getgroups(0,NULL) does not return the number of groups.])
|
||||
else
|
||||
dnl Detect FreeBSD bug; POSIX requires getgroups(-1,ptr) to fail.
|
||||
dnl Detect Mac OS X and FreeBSD bug; POSIX requires getgroups(-1,ptr)
|
||||
dnl to fail.
|
||||
AC_CACHE_CHECK([whether getgroups handles negative values],
|
||||
[gl_cv_func_getgroups_works],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
|
||||
|
@ -1,4 +1,4 @@
|
||||
# serial 27
|
||||
# serial 28
|
||||
|
||||
# Copyright (C) 2001-2003, 2005, 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
@ -19,7 +19,6 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
|
||||
if test $ac_cv_func_gettimeofday != yes; then
|
||||
HAVE_GETTIMEOFDAY=0
|
||||
else
|
||||
gl_FUNC_GETTIMEOFDAY_CLOBBER
|
||||
AC_CACHE_CHECK([for gettimeofday with POSIX signature],
|
||||
[gl_cv_func_gettimeofday_posix_signature],
|
||||
[AC_COMPILE_IFELSE(
|
||||
@ -66,63 +65,5 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict);
|
||||
declaration of the second argument to gettimeofday.])
|
||||
])
|
||||
|
||||
|
||||
dnl See if gettimeofday clobbers the static buffer that localtime uses
|
||||
dnl for its return value. The gettimeofday function from Mac OS X 10.0.4
|
||||
dnl (i.e., Darwin 1.3.7) has this problem.
|
||||
dnl
|
||||
dnl If it does, then arrange to use gettimeofday and localtime only via
|
||||
dnl the wrapper functions that work around the problem.
|
||||
|
||||
AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
|
||||
[
|
||||
AC_REQUIRE([gl_HEADER_SYS_TIME_H])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
|
||||
|
||||
AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
|
||||
[gl_cv_func_gettimeofday_clobber],
|
||||
[AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
]],
|
||||
[[
|
||||
time_t t = 0;
|
||||
struct tm *lt;
|
||||
struct tm saved_lt;
|
||||
struct timeval tv;
|
||||
lt = localtime (&t);
|
||||
saved_lt = *lt;
|
||||
gettimeofday (&tv, NULL);
|
||||
return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
|
||||
]])],
|
||||
[gl_cv_func_gettimeofday_clobber=no],
|
||||
[gl_cv_func_gettimeofday_clobber=yes],
|
||||
[# When cross-compiling:
|
||||
case "$host_os" in
|
||||
# Guess all is fine on glibc systems.
|
||||
*-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
|
||||
# Guess all is fine on musl systems.
|
||||
*-musl*) 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, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
|
||||
esac
|
||||
])])
|
||||
|
||||
case "$gl_cv_func_gettimeofday_clobber" in
|
||||
*yes)
|
||||
REPLACE_GETTIMEOFDAY=1
|
||||
AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
|
||||
[Define if gettimeofday clobbers the localtime buffer.])
|
||||
gl_LOCALTIME_BUFFER_NEEDED
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Prerequisites of lib/gettimeofday.c.
|
||||
AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:])
|
||||
|
@ -1,4 +1,4 @@
|
||||
# gnulib-common.m4 serial 50
|
||||
# gnulib-common.m4 serial 52
|
||||
dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
@ -120,9 +120,14 @@ AC_DEFUN([gl_COMMON_BODY], [
|
||||
#endif
|
||||
|
||||
/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
|
||||
<https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */
|
||||
<https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
|
||||
Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */
|
||||
#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
|
||||
# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
|
||||
# ifndef __SUNPRO_C
|
||||
# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
|
||||
# else
|
||||
# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
|
||||
# endif
|
||||
#else
|
||||
# define _GL_ATTRIBUTE_COLD
|
||||
#endif
|
||||
@ -176,7 +181,8 @@ AC_DEFUN([gl_COMMON_BODY], [
|
||||
# define _GL_ATTRIBUTE_LEAF
|
||||
#endif
|
||||
|
||||
#if _GL_HAS_ATTRIBUTE (may_alias)
|
||||
/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */
|
||||
#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
|
||||
# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
|
||||
#else
|
||||
# define _GL_ATTRIBUTE_MAY_ALIAS
|
||||
@ -292,6 +298,20 @@ AC_DEFUN([gl_COMMON_BODY], [
|
||||
that may clobber errno, it needs to save and restore the value of
|
||||
errno. */
|
||||
#define _GL_ASYNC_SAFE
|
||||
])
|
||||
AH_VERBATIM([micro_optimizations],
|
||||
[/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2.
|
||||
It returns
|
||||
1 if n1 > n2
|
||||
0 if n1 == n2
|
||||
-1 if n1 < n2
|
||||
The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional
|
||||
jump with nearly all GCC versions up to GCC 10.
|
||||
This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many
|
||||
GCC versions up to GCC 9.
|
||||
The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9
|
||||
avoids conditional jumps in all GCC versions >= 3.4. */
|
||||
#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
|
||||
])
|
||||
dnl Hint which direction to take regarding cross-compilation guesses:
|
||||
dnl When a user installs a program on a platform they are not intimately
|
||||
@ -612,6 +632,15 @@ AC_DEFUN([gl_BIGENDIAN],
|
||||
AC_C_BIGENDIAN
|
||||
])
|
||||
|
||||
# gl_SILENT(command)
|
||||
# executes command, but without the normal configure output.
|
||||
AC_DEFUN([gl_SILENT],
|
||||
[
|
||||
{
|
||||
$1
|
||||
} AS_MESSAGE_FD>/dev/null
|
||||
])
|
||||
|
||||
# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
|
||||
# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
|
||||
# output a spurious "(cached)" mark in the midst of other configure output.
|
||||
|
@ -120,7 +120,6 @@ AC_DEFUN([gl_EARLY],
|
||||
# Code from module libc-config:
|
||||
# Code from module libgmp:
|
||||
# Code from module limits-h:
|
||||
# Code from module localtime-buffer:
|
||||
# Code from module lstat:
|
||||
# Code from module malloca:
|
||||
# Code from module manywarnings:
|
||||
@ -508,7 +507,6 @@ AC_DEFUN([gl_INIT],
|
||||
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
|
||||
gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
|
||||
gl_gnulib_enabled_lchmod=false
|
||||
gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9=false
|
||||
gl_gnulib_enabled_malloca=false
|
||||
gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=false
|
||||
gl_gnulib_enabled_open=false
|
||||
@ -624,14 +622,6 @@ AC_DEFUN([gl_INIT],
|
||||
gl_gnulib_enabled_lchmod=true
|
||||
fi
|
||||
}
|
||||
func_gl_gnulib_m4code_2049e887c7e5308faad27b3f894bb8c9 ()
|
||||
{
|
||||
if ! $gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9; then
|
||||
AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
|
||||
AC_LIBOBJ([localtime-buffer])
|
||||
gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9=true
|
||||
fi
|
||||
}
|
||||
func_gl_gnulib_m4code_malloca ()
|
||||
{
|
||||
if ! $gl_gnulib_enabled_malloca; then
|
||||
@ -751,9 +741,6 @@ AC_DEFUN([gl_INIT],
|
||||
if case $host_os in mingw*) false;; *) test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1;; esac; then
|
||||
func_gl_gnulib_m4code_open
|
||||
fi
|
||||
if test $NEED_LOCALTIME_BUFFER = 1; then
|
||||
func_gl_gnulib_m4code_2049e887c7e5308faad27b3f894bb8c9
|
||||
fi
|
||||
if test $HAVE_READLINKAT = 0; then
|
||||
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
|
||||
fi
|
||||
@ -785,7 +772,6 @@ AC_DEFUN([gl_INIT],
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], [$gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_lchmod], [$gl_gnulib_enabled_lchmod])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9], [$gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_malloca], [$gl_gnulib_enabled_malloca])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31], [$gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open])
|
||||
@ -1030,8 +1016,6 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||
lib/lchmod.c
|
||||
lib/libc-config.h
|
||||
lib/limits.in.h
|
||||
lib/localtime-buffer.c
|
||||
lib/localtime-buffer.h
|
||||
lib/lstat.c
|
||||
lib/malloca.c
|
||||
lib/malloca.h
|
||||
@ -1176,7 +1160,6 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||
m4/lchmod.m4
|
||||
m4/libgmp.m4
|
||||
m4/limits-h.m4
|
||||
m4/localtime-buffer.m4
|
||||
m4/lstat.m4
|
||||
m4/malloca.m4
|
||||
m4/manywarnings-c++.m4
|
||||
|
@ -1,4 +1,4 @@
|
||||
# inttypes.m4 serial 29
|
||||
# inttypes.m4 serial 31
|
||||
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
@ -35,12 +35,19 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
|
||||
# Ensure that the PRI* and SCN* macros are defined appropriately.
|
||||
AC_DEFUN([gl_INTTYPES_PRI_SCN],
|
||||
[
|
||||
AC_REQUIRE([gt_INTTYPES_PRI])
|
||||
|
||||
PRIPTR_PREFIX=
|
||||
if test -n "$STDINT_H"; then
|
||||
dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
|
||||
PRIPTR_PREFIX='"l"'
|
||||
dnl Using the gnulib <stdint.h>. It defines intptr_t to 'long' or
|
||||
dnl 'long long', depending on _WIN64.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#ifdef _WIN64
|
||||
LLP64
|
||||
#endif
|
||||
]]),
|
||||
],
|
||||
[PRIPTR_PREFIX='"l"'],
|
||||
[PRIPTR_PREFIX='"ll"'])
|
||||
else
|
||||
dnl Using the system's <stdint.h>.
|
||||
for glpfx in '' l ll I64; do
|
||||
@ -152,7 +159,6 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
|
||||
REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
|
||||
INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
|
||||
INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX])
|
||||
PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN])
|
||||
PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX])
|
||||
UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
|
||||
UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])
|
||||
|
65
m4/libgmp.m4
65
m4/libgmp.m4
@ -1,44 +1,67 @@
|
||||
# libgmp.m4 serial 4
|
||||
# Configure the GMP library or a replacement.
|
||||
|
||||
dnl Copyright 2020 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.
|
||||
|
||||
dnl gl_LIBGMP
|
||||
dnl Search for an installed libgmp.
|
||||
dnl If found, set and AC_SUBST HAVE_LIBGMP=yes and the LIBGMP and LTLIBGMP
|
||||
dnl variables, and augment the CPPFLAGS variable, and #define HAVE_LIBGMP to 1.
|
||||
dnl Otherwise, set and AC_SUBST HAVE_LIBGMP=no and LIBGMP and LTLIBGMP to
|
||||
dnl empty.
|
||||
|
||||
AC_DEFUN([gl_LIBGMP],
|
||||
[
|
||||
AC_ARG_WITH([libgmp],
|
||||
[AS_HELP_STRING([--without-libgmp],
|
||||
[do not use the GNU Multiple Precision (GMP) library;
|
||||
this is the default on systems lacking libgmp.])])
|
||||
|
||||
AC_CHECK_HEADERS_ONCE([gmp.h])
|
||||
GMP_H=gmp.h
|
||||
LIB_GMP=
|
||||
|
||||
case $with_libgmp in
|
||||
no) ;;
|
||||
yes) GMP_H= LIB_GMP=-lgmp;;
|
||||
*) if test "$ac_cv_header_gmp_h" = yes; then
|
||||
gl_saved_LIBS=$LIBS
|
||||
case "$with_libgmp" in
|
||||
no)
|
||||
HAVE_LIBGMP=no
|
||||
LIBGMP=
|
||||
LTLIBGMP=
|
||||
;;
|
||||
*)
|
||||
dnl Prefer AC_LIB_HAVE_LINKFLAGS if the havelib module is also in use.
|
||||
m4_ifdef([gl_HAVE_MODULE_HAVELIB],
|
||||
[AC_LIB_HAVE_LINKFLAGS([gmp], [],
|
||||
[#include <gmp.h>],
|
||||
[static const mp_limb_t x[2] = { 0x73, 0x55 };
|
||||
mpz_t tmp;
|
||||
mpz_roinit_n (tmp, x, 2);
|
||||
],
|
||||
[no])],
|
||||
[gl_saved_LIBS=$LIBS
|
||||
AC_SEARCH_LIBS([__gmpz_roinit_n], [gmp])
|
||||
LIBS=$gl_saved_LIBS
|
||||
case $ac_cv_search___gmpz_roinit_n in
|
||||
'none needed')
|
||||
GMP_H=;;
|
||||
HAVE_LIBGMP=yes LIBGMP=;;
|
||||
-*)
|
||||
GMP_H= LIB_GMP=$ac_cv_search___gmpz_roinit_n;;
|
||||
HAVE_LIBGMP=yes LIBGMP=$ac_cv_search___gmpz_roinit_n;;
|
||||
*)
|
||||
HAVE_LIBGMP=no LIBGMP=;;
|
||||
esac
|
||||
fi;;
|
||||
LTLIBGMP=$LIBGMP
|
||||
AC_SUBST([HAVE_LIBGMP])
|
||||
AC_SUBST([LIBGMP])
|
||||
AC_SUBST([LTLIBGMP])])
|
||||
if test "$with_libgmp,$HAVE_LIBGMP" = yes,no; then
|
||||
AC_MSG_ERROR(
|
||||
[GMP not found, although --with-libgmp was specified.m4_ifdef(
|
||||
[AC_LIB_HAVE_LINKFLAGS],
|
||||
[ Try specifying --with-libgmp-prefix=DIR.])])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$GMP_H"; then
|
||||
AC_DEFINE([HAVE_GMP], 1,
|
||||
[Define to 1 if you have the GMP library instead of just the
|
||||
mini-gmp replacement.])
|
||||
if test $HAVE_LIBGMP = yes; then
|
||||
GMP_H=
|
||||
else
|
||||
GMP_H=gmp.h
|
||||
fi
|
||||
|
||||
AC_SUBST([LIB_GMP])
|
||||
AC_SUBST([GMP_H])
|
||||
AM_CONDITIONAL([GL_GENERATE_GMP_H], [test -n "$GMP_H"])
|
||||
])
|
||||
|
35
m4/mktime.m4
35
m4/mktime.m4
@ -1,4 +1,4 @@
|
||||
# serial 31
|
||||
# serial 32
|
||||
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
@ -33,15 +33,15 @@ AC_DEFUN([gl_FUNC_MKTIME_WORKS],
|
||||
AC_CHECK_DECLS_ONCE([alarm])
|
||||
AC_CHECK_FUNCS_ONCE([tzset])
|
||||
AC_REQUIRE([gl_MULTIARCH])
|
||||
if test $APPLE_UNIVERSAL_BUILD = 1; then
|
||||
# A universal build on Apple Mac OS X platforms.
|
||||
# The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
|
||||
# But we need a configuration result that is valid in both modes.
|
||||
gl_cv_func_working_mktime=no
|
||||
fi
|
||||
AC_CACHE_CHECK([for working mktime], [gl_cv_func_working_mktime],
|
||||
[AC_RUN_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[if test $APPLE_UNIVERSAL_BUILD = 1; then
|
||||
# A universal build on Apple Mac OS X platforms.
|
||||
# The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
|
||||
# But we need a configuration result that is valid in both modes.
|
||||
gl_cv_func_working_mktime="guessing no"
|
||||
else
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[/* Test program from Paul Eggert and Tony Leneis. */
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
@ -242,14 +242,15 @@ main ()
|
||||
result |= 64;
|
||||
return result;
|
||||
}]])],
|
||||
[gl_cv_func_working_mktime=yes],
|
||||
[gl_cv_func_working_mktime=no],
|
||||
[case "$host_os" in
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_working_mktime="guessing no" ;;
|
||||
*) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
[gl_cv_func_working_mktime=yes],
|
||||
[gl_cv_func_working_mktime=no],
|
||||
[case "$host_os" in
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_working_mktime="guessing no" ;;
|
||||
*) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# multiarch.m4 serial 7
|
||||
# multiarch.m4 serial 9
|
||||
dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
@ -21,37 +21,40 @@ dnl with or without modifications, as long as this notice is preserved.
|
||||
AC_DEFUN_ONCE([gl_MULTIARCH],
|
||||
[
|
||||
dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
|
||||
gl_cv_c_multiarch=no
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#ifndef __APPLE_CC__
|
||||
not a universal capable compiler
|
||||
#endif
|
||||
typedef int dummy;
|
||||
]])],
|
||||
[
|
||||
dnl Check for potential -arch flags. It is not universal unless
|
||||
dnl there are at least two -arch flags with different values.
|
||||
arch=
|
||||
prev=
|
||||
for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
|
||||
if test -n "$prev"; then
|
||||
case $word in
|
||||
i?86 | x86_64 | ppc | ppc64)
|
||||
if test -z "$arch" || test "$arch" = "$word"; then
|
||||
arch="$word"
|
||||
else
|
||||
gl_cv_c_multiarch=yes
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
prev=
|
||||
else
|
||||
if test "x$word" = "x-arch"; then
|
||||
prev=arch
|
||||
fi
|
||||
fi
|
||||
done
|
||||
AC_CACHE_CHECK([whether the compiler produces multi-arch binaries],
|
||||
[gl_cv_c_multiarch],
|
||||
[gl_cv_c_multiarch=no
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#ifndef __APPLE_CC__
|
||||
not a universal capable compiler
|
||||
#endif
|
||||
typedef int dummy;
|
||||
]])],
|
||||
[
|
||||
dnl Check for potential -arch flags. It is not universal unless
|
||||
dnl there are at least two -arch flags with different values.
|
||||
arch=
|
||||
prev=
|
||||
for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
|
||||
if test -n "$prev"; then
|
||||
case $word in
|
||||
i?86 | x86_64 | ppc | ppc64 | arm | arm64)
|
||||
if test -z "$arch" || test "$arch" = "$word"; then
|
||||
arch="$word"
|
||||
else
|
||||
gl_cv_c_multiarch=yes
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
prev=
|
||||
else
|
||||
if test "x$word" = "x-arch"; then
|
||||
prev=arch
|
||||
fi
|
||||
fi
|
||||
done
|
||||
])
|
||||
])
|
||||
if test $gl_cv_c_multiarch = yes; then
|
||||
APPLE_UNIVERSAL_BUILD=1
|
||||
|
@ -323,7 +323,7 @@ INTERVALS_H = dispextern.h intervals.h composite.h
|
||||
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
|
||||
LIB_GMP = @LIB_GMP@
|
||||
LIBGMP = @LIBGMP@
|
||||
|
||||
RUN_TEMACS = ./temacs
|
||||
|
||||
@ -530,7 +530,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
|
||||
$(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(HARFBUZZ_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
|
||||
$(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LCMS2_LIBS) \
|
||||
$(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) \
|
||||
$(JSON_LIBS) $(LIB_GMP)
|
||||
$(JSON_LIBS) $(LIBGMP)
|
||||
|
||||
## FORCE it so that admin/unidata can decide whether this file is
|
||||
## up-to-date. Although since charprop depends on bootstrap-emacs,
|
||||
|
@ -256,7 +256,7 @@ FPIC_CFLAGS = -fPIC
|
||||
endif
|
||||
|
||||
GMP_H = @GMP_H@
|
||||
LIB_GMP = @LIB_GMP@
|
||||
LIBGMP = @LIBGMP@
|
||||
|
||||
MODULE_CFLAGS = -I../src -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib \
|
||||
$(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
|
||||
@ -271,7 +271,7 @@ src/emacs-module-tests.log src/emacs-module-tests.elc: $(test_module)
|
||||
$(test_module): $(test_module:${SO}=.c) ../src/emacs-module.h
|
||||
$(AM_V_at)${MKDIR_P} $(dir $@)
|
||||
$(AM_V_CCLD)$(CC) -shared $(CPPFLAGS) $(MODULE_CFLAGS) $(LDFLAGS) \
|
||||
-o $@ $< $(LIB_GMP) \
|
||||
-o $@ $< $(LIBGMP) \
|
||||
$(and $(GMP_H),$(srcdir)/../lib/mini-gmp-gnulib.c) \
|
||||
$(srcdir)/../lib/timespec.c $(srcdir)/../lib/gettime.c
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user