mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-07 20:59:37 +00:00
Merge from Gnulib
This incorporates: 2017-10-29 timespec: prefer ‘assume’ to ‘assure’ 2017-10-27 timespec.h: use "assure" to avoid a spurious warning 2017-10-09 getopt-posix: Fix build failure if ac_cv_header_getopt_h=no * build-aux/config.guess, build-aux/config.sub: * lib/timespec.h, lib/unistd.in.h: Copy from Gnulib.
This commit is contained in:
parent
6b08ad5263
commit
04bc1410c2
4 changed files with 32 additions and 25 deletions
20
build-aux/config.guess
vendored
20
build-aux/config.guess
vendored
|
@ -2,7 +2,7 @@
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright 1992-2017 Free Software Foundation, Inc.
|
# Copyright 1992-2017 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2017-09-26'
|
timestamp='2017-11-01'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# 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
|
# under the terms of the GNU General Public License as published by
|
||||||
|
@ -479,13 +479,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
#endif
|
#endif
|
||||||
#if defined (host_mips) && defined (MIPSEB)
|
#if defined (host_mips) && defined (MIPSEB)
|
||||||
#if defined (SYSTYPE_SYSV)
|
#if defined (SYSTYPE_SYSV)
|
||||||
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
|
printf ("mips-mips-risco0s%ssysv\\n", argv[1]); exit (0);
|
||||||
#endif
|
#endif
|
||||||
#if defined (SYSTYPE_SVR4)
|
#if defined (SYSTYPE_SVR4)
|
||||||
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
|
printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
|
||||||
#endif
|
#endif
|
||||||
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
|
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
|
||||||
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
|
printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
exit (-1);
|
exit (-1);
|
||||||
|
@ -608,7 +608,7 @@ EOF
|
||||||
*:AIX:*:*)
|
*:AIX:*:*)
|
||||||
echo rs6000-ibm-aix
|
echo rs6000-ibm-aix
|
||||||
exit ;;
|
exit ;;
|
||||||
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
|
ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
|
||||||
echo romp-ibm-bsd4.4
|
echo romp-ibm-bsd4.4
|
||||||
exit ;;
|
exit ;;
|
||||||
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
|
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
|
||||||
|
@ -629,8 +629,8 @@ EOF
|
||||||
9000/[34678]??:HP-UX:*:*)
|
9000/[34678]??:HP-UX:*:*)
|
||||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||||
case "${UNAME_MACHINE}" in
|
case "${UNAME_MACHINE}" in
|
||||||
9000/31? ) HP_ARCH=m68000 ;;
|
9000/31?) HP_ARCH=m68000 ;;
|
||||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
9000/[34]??) HP_ARCH=m68k ;;
|
||||||
9000/[678][0-9][0-9])
|
9000/[678][0-9][0-9])
|
||||||
if [ -x /usr/bin/getconf ]; then
|
if [ -x /usr/bin/getconf ]; then
|
||||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||||
|
@ -743,7 +743,7 @@ EOF
|
||||||
{ echo "$SYSTEM_NAME"; exit; }
|
{ echo "$SYSTEM_NAME"; exit; }
|
||||||
echo unknown-hitachi-hiuxwe2
|
echo unknown-hitachi-hiuxwe2
|
||||||
exit ;;
|
exit ;;
|
||||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
|
||||||
echo hppa1.1-hp-bsd
|
echo hppa1.1-hp-bsd
|
||||||
exit ;;
|
exit ;;
|
||||||
9000/8??:4.3bsd:*:*)
|
9000/8??:4.3bsd:*:*)
|
||||||
|
@ -752,7 +752,7 @@ EOF
|
||||||
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
|
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
|
||||||
echo hppa1.0-hp-mpeix
|
echo hppa1.0-hp-mpeix
|
||||||
exit ;;
|
exit ;;
|
||||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
|
||||||
echo hppa1.1-hp-osf
|
echo hppa1.1-hp-osf
|
||||||
exit ;;
|
exit ;;
|
||||||
hp8??:OSF1:*:*)
|
hp8??:OSF1:*:*)
|
||||||
|
@ -1072,7 +1072,7 @@ EOF
|
||||||
i*86:*DOS:*:*)
|
i*86:*DOS:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
i*86:*:4.*:*)
|
||||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
|
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
|
||||||
|
|
10
build-aux/config.sub
vendored
10
build-aux/config.sub
vendored
|
@ -2,7 +2,7 @@
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2017 Free Software Foundation, Inc.
|
# Copyright 1992-2017 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2017-09-26'
|
timestamp='2017-11-01'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# 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
|
# under the terms of the GNU General Public License as published by
|
||||||
|
@ -640,7 +640,7 @@ case $basic_machine in
|
||||||
basic_machine=rs6000-bull
|
basic_machine=rs6000-bull
|
||||||
os=-bosx
|
os=-bosx
|
||||||
;;
|
;;
|
||||||
dpx2* | dpx2*-bull)
|
dpx2*)
|
||||||
basic_machine=m68k-bull
|
basic_machine=m68k-bull
|
||||||
os=-sysv3
|
os=-sysv3
|
||||||
;;
|
;;
|
||||||
|
@ -902,7 +902,7 @@ case $basic_machine in
|
||||||
basic_machine=v70-nec
|
basic_machine=v70-nec
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
next | m*-next )
|
next | m*-next)
|
||||||
basic_machine=m68k-next
|
basic_machine=m68k-next
|
||||||
case $os in
|
case $os in
|
||||||
-nextstep* )
|
-nextstep* )
|
||||||
|
@ -1492,7 +1492,7 @@ case $os in
|
||||||
-nova*)
|
-nova*)
|
||||||
os=-rtmk-nova
|
os=-rtmk-nova
|
||||||
;;
|
;;
|
||||||
-ns2 )
|
-ns2)
|
||||||
os=-nextstep2
|
os=-nextstep2
|
||||||
;;
|
;;
|
||||||
-nsk*)
|
-nsk*)
|
||||||
|
@ -1694,7 +1694,7 @@ case $basic_machine in
|
||||||
m88k-omron*)
|
m88k-omron*)
|
||||||
os=-luna
|
os=-luna
|
||||||
;;
|
;;
|
||||||
*-next )
|
*-next)
|
||||||
os=-nextstep
|
os=-nextstep
|
||||||
;;
|
;;
|
||||||
*-sequent)
|
*-sequent)
|
||||||
|
|
|
@ -33,6 +33,8 @@ _GL_INLINE_HEADER_BEGIN
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "verify.h"
|
||||||
|
|
||||||
/* Resolution of timespec timestamps (in units per second), and log
|
/* Resolution of timespec timestamps (in units per second), and log
|
||||||
base 10 of the resolution. */
|
base 10 of the resolution. */
|
||||||
|
|
||||||
|
@ -67,23 +69,29 @@ make_timespec (time_t s, long int ns)
|
||||||
any platform of interest to the GNU project, since all such
|
any platform of interest to the GNU project, since all such
|
||||||
platforms have 32-bit int or wider.
|
platforms have 32-bit int or wider.
|
||||||
|
|
||||||
Replacing "(int) (a.tv_nsec - b.tv_nsec)" with something like
|
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
|
"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
|
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,
|
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
|
b.tv_sec==0, b.tv_nsec==999999999) and is arguably not worth the
|
||||||
extra instructions. Using a subtraction has the advantage of
|
extra instructions. Using a subtraction has the advantage of
|
||||||
detecting some invalid cases on platforms that detect integer
|
detecting some invalid cases on platforms that detect integer
|
||||||
overflow.
|
overflow. */
|
||||||
|
|
||||||
The (int) cast avoids a gcc -Wconversion warning. */
|
|
||||||
|
|
||||||
_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
|
_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
|
||||||
timespec_cmp (struct timespec a, struct timespec b)
|
timespec_cmp (struct timespec a, struct timespec b)
|
||||||
{
|
{
|
||||||
return (a.tv_sec < b.tv_sec ? -1
|
if (a.tv_sec < b.tv_sec)
|
||||||
: a.tv_sec > b.tv_sec ? 1
|
return -1;
|
||||||
: (int) (a.tv_nsec - b.tv_nsec));
|
if (a.tv_sec > b.tv_sec)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
/* Pacify gcc -Wstrict-overflow (bleeding-edge circa 2017-10-02). See:
|
||||||
|
http://lists.gnu.org/archive/html/bug-gnulib/2017-10/msg00006.html */
|
||||||
|
assume (-1 <= a.tv_nsec && a.tv_nsec <= 2 * TIMESPEC_RESOLUTION);
|
||||||
|
assume (-1 <= b.tv_nsec && b.tv_nsec <= 2 * TIMESPEC_RESOLUTION);
|
||||||
|
|
||||||
|
return a.tv_nsec - b.tv_nsec;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be
|
/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be
|
||||||
|
|
|
@ -134,9 +134,8 @@
|
||||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||||
|
|
||||||
|
|
||||||
/* Get getopt(), optarg, optind, opterr, optopt.
|
/* Get getopt(), optarg, optind, opterr, optopt. */
|
||||||
But avoid namespace pollution on glibc systems. */
|
#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
|
||||||
#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
|
|
||||||
# include <getopt-cdefs.h>
|
# include <getopt-cdefs.h>
|
||||||
# include <getopt-pfx-core.h>
|
# include <getopt-pfx-core.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue