mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Update from Gnulib
This incorporates: 2018-06-29 regex: glibc does not use intprops.h 2018-06-28 regex: port to recently proposed glibc regex merge 2018-06-25 Continue to use spaces for indentation, not tabs 2018-06-25 manywarnings: Don't enable -Wjump-misses-init by default 2018-06-25 acl-internal.h: remove _GL_ATTRIBUTE_CONST on void function 2018-06-24 manywarnings: accommodate GCC 9: remove -Wchkp and -Wabi 2018-06-24 maint: clarify comments about sticky EOF 2018-06-24 af_alg: avoid hangs when reading from streams 2018-06-17 crypto: use byteswap 2018-06-17 getloadavg: Return 0 on MS-Windows without Cygwi 2018-06-17 getloadavg: Allow building on MS-Windows without Cygwin * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex: * lib/acl-internal.c, lib/acl-internal.h, lib/get-permissions.c: * lib/getloadavg.c, lib/gettimeofday.c, lib/md5.c, lib/pselect.c: * lib/set-permissions.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: * lib/time.in.h, m4/getloadavg.m4, m4/gnulib-common.m4: * m4/manywarnings.m4, m4/pthread_sigmask.m4, m4/vararrays.m4: Copy from Gnulib.
This commit is contained in:
parent
2e2811865f
commit
35e9dcab51
20 changed files with 403 additions and 427 deletions
6
build-aux/config.guess
vendored
6
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-2018 Free Software Foundation, Inc.
|
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2018-05-19'
|
timestamp='2018-06-26'
|
||||||
|
|
||||||
# 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
|
||||||
|
|
@ -894,8 +894,8 @@ EOF
|
||||||
# other systems with GNU libc and userland
|
# other systems with GNU libc and userland
|
||||||
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
|
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:Minix:*:*)
|
*:Minix:*:*)
|
||||||
echo "$UNAME_MACHINE"-pc-minix
|
echo "$UNAME_MACHINE"-unknown-minix
|
||||||
exit ;;
|
exit ;;
|
||||||
aarch64:Linux:*:*)
|
aarch64:Linux:*:*)
|
||||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||||
|
|
|
||||||
209
build-aux/config.sub
vendored
209
build-aux/config.sub
vendored
|
|
@ -2,7 +2,7 @@
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2018-05-19'
|
timestamp='2018-05-24'
|
||||||
|
|
||||||
# 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
|
||||||
|
|
@ -149,8 +149,30 @@ case $1 in
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*-*)
|
*-*)
|
||||||
basic_machine=$field1
|
# Second component is usually, but not always the OS
|
||||||
os=$field2
|
case $field2 in
|
||||||
|
# Prevent following clause from handling this valid os
|
||||||
|
sun*os*)
|
||||||
|
basic_machine=$field1
|
||||||
|
os=$field2
|
||||||
|
;;
|
||||||
|
# Manufacturers
|
||||||
|
dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \
|
||||||
|
| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
|
||||||
|
| unicom* | ibm* | next | hp | isi* | apollo | altos* \
|
||||||
|
| convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \
|
||||||
|
| c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \
|
||||||
|
| harris | dolphin | highlevel | gould | cbm | ns | masscomp \
|
||||||
|
| apple | axis | knuth | cray | microblaze* \
|
||||||
|
| sim | cisco | oki | wec | wrs | winbond)
|
||||||
|
basic_machine=$field1-$field2
|
||||||
|
os=
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
basic_machine=$field1
|
||||||
|
os=$field2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Convert single-component short-hands not valid as part of
|
# Convert single-component short-hands not valid as part of
|
||||||
|
|
@ -540,110 +562,6 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
### Let's recognize common machines as not being operating systems so
|
|
||||||
### that things like config.sub decstation-3100 work. We also
|
|
||||||
### recognize some manufacturers as not being operating systems, so we
|
|
||||||
### can provide default operating systems below.
|
|
||||||
case $os in
|
|
||||||
sun*os*)
|
|
||||||
# Prevent following clause from handling this invalid input.
|
|
||||||
;;
|
|
||||||
dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* | \
|
|
||||||
att* | 7300* | 3300* | delta* | motorola* | sun[234]* | \
|
|
||||||
unicom* | ibm* | next | hp | isi* | apollo | altos* | \
|
|
||||||
convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* |\
|
|
||||||
c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* | \
|
|
||||||
harris | dolphin | highlevel | gould | cbm | ns | masscomp | \
|
|
||||||
apple | axis | knuth | cray | microblaze*)
|
|
||||||
os=
|
|
||||||
basic_machine=$1
|
|
||||||
;;
|
|
||||||
bluegene*)
|
|
||||||
os=cnk
|
|
||||||
;;
|
|
||||||
sim | cisco | oki | wec | winbond)
|
|
||||||
os=
|
|
||||||
basic_machine=$1
|
|
||||||
;;
|
|
||||||
scout)
|
|
||||||
;;
|
|
||||||
wrs)
|
|
||||||
os=vxworks
|
|
||||||
basic_machine=$1
|
|
||||||
;;
|
|
||||||
chorusos*)
|
|
||||||
os=chorusos
|
|
||||||
basic_machine=$1
|
|
||||||
;;
|
|
||||||
chorusrdb)
|
|
||||||
os=chorusrdb
|
|
||||||
basic_machine=$1
|
|
||||||
;;
|
|
||||||
hiux*)
|
|
||||||
os=hiuxwe2
|
|
||||||
;;
|
|
||||||
sco6)
|
|
||||||
os=sco5v6
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
sco5)
|
|
||||||
os=sco3.2v5
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
sco4)
|
|
||||||
os=sco3.2v4
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
sco3.2.[4-9]*)
|
|
||||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
sco3.2v[4-9]*)
|
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
sco5v6*)
|
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
sco*)
|
|
||||||
os=sco3.2v2
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
udk*)
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
isc)
|
|
||||||
os=isc2.2
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
clix*)
|
|
||||||
basic_machine=clipper-intergraph
|
|
||||||
;;
|
|
||||||
isc*)
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
|
||||||
;;
|
|
||||||
lynx*178)
|
|
||||||
os=lynxos178
|
|
||||||
;;
|
|
||||||
lynx*5)
|
|
||||||
os=lynxos5
|
|
||||||
;;
|
|
||||||
lynx*)
|
|
||||||
os=lynxos
|
|
||||||
;;
|
|
||||||
ptx*)
|
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
|
|
||||||
;;
|
|
||||||
psos*)
|
|
||||||
os=psos
|
|
||||||
;;
|
|
||||||
mint | mint[0-9]*)
|
|
||||||
basic_machine=m68k-atari
|
|
||||||
os=mint
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Decode aliases for certain CPU-COMPANY combinations.
|
# Decode aliases for certain CPU-COMPANY combinations.
|
||||||
case $basic_machine in
|
case $basic_machine in
|
||||||
# Recognize the basic CPU types without company name.
|
# Recognize the basic CPU types without company name.
|
||||||
|
|
@ -1377,6 +1295,9 @@ case $os in
|
||||||
auroraux)
|
auroraux)
|
||||||
os=auroraux
|
os=auroraux
|
||||||
;;
|
;;
|
||||||
|
bluegene*)
|
||||||
|
os=cnk
|
||||||
|
;;
|
||||||
solaris1 | solaris1.*)
|
solaris1 | solaris1.*)
|
||||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||||
;;
|
;;
|
||||||
|
|
@ -1393,26 +1314,57 @@ case $os in
|
||||||
es1800*)
|
es1800*)
|
||||||
os=ose
|
os=ose
|
||||||
;;
|
;;
|
||||||
|
# Some version numbers need modification
|
||||||
|
chorusos*)
|
||||||
|
os=chorusos
|
||||||
|
;;
|
||||||
|
isc)
|
||||||
|
os=isc2.2
|
||||||
|
;;
|
||||||
|
sco6)
|
||||||
|
os=sco5v6
|
||||||
|
;;
|
||||||
|
sco5)
|
||||||
|
os=sco3.2v5
|
||||||
|
;;
|
||||||
|
sco4)
|
||||||
|
os=sco3.2v4
|
||||||
|
;;
|
||||||
|
sco3.2.[4-9]*)
|
||||||
|
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||||
|
;;
|
||||||
|
sco3.2v[4-9]* | sco5v6*)
|
||||||
|
# Don't forget version if it is 3.2v4 or newer.
|
||||||
|
;;
|
||||||
|
scout)
|
||||||
|
# Don't match below
|
||||||
|
;;
|
||||||
|
sco*)
|
||||||
|
os=sco3.2v2
|
||||||
|
;;
|
||||||
|
psos*)
|
||||||
|
os=psos
|
||||||
|
;;
|
||||||
# Now accept the basic system types.
|
# Now accept the basic system types.
|
||||||
# The portable systems comes first.
|
# The portable systems comes first.
|
||||||
# Each alternative MUST end in a * to match a version number.
|
# Each alternative MUST end in a * to match a version number.
|
||||||
# sysv* is not here because it comes later, after sysvr4.
|
# sysv* is not here because it comes later, after sysvr4.
|
||||||
gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
|
gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
|
||||||
| *vms* | sco* | esix* | isc* | aix* | cnk* | sunos | sunos[34]*\
|
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
|
||||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||||
| sym* | kopensolaris* | plan9* \
|
| sym* | kopensolaris* | plan9* \
|
||||||
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
||||||
| aos* | aros* | cloudabi* | sortix* \
|
| aos* | aros* | cloudabi* | sortix* \
|
||||||
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
|
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
|
||||||
| clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
|
| clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
|
||||||
| hiux* | knetbsd* | mirbsd* | netbsd* \
|
| knetbsd* | mirbsd* | netbsd* \
|
||||||
| bitrig* | openbsd* | solidbsd* | libertybsd* \
|
| bitrig* | openbsd* | solidbsd* | libertybsd* \
|
||||||
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
|
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
|
||||||
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
|
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
|
||||||
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
|
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
|
||||||
| udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
|
| udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
|
||||||
| chorusos* | chorusrdb* | cegcc* | glidix* \
|
| chorusrdb* | cegcc* | glidix* \
|
||||||
| cygwin* | msys* | pe* | psos* | moss* | proelf* | rtems* \
|
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
|
||||||
| midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
|
| midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
|
||||||
| linux-newlib* | linux-musl* | linux-uclibc* \
|
| linux-newlib* | linux-musl* | linux-uclibc* \
|
||||||
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
||||||
|
|
@ -1436,6 +1388,9 @@ case $os in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
hiux*)
|
||||||
|
os=hiuxwe2
|
||||||
|
;;
|
||||||
nto-qnx*)
|
nto-qnx*)
|
||||||
;;
|
;;
|
||||||
nto*)
|
nto*)
|
||||||
|
|
@ -1445,20 +1400,23 @@ case $os in
|
||||||
| windows* | osx | abug | netware* | os9* \
|
| windows* | osx | abug | netware* | os9* \
|
||||||
| macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
|
| macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
|
||||||
;;
|
;;
|
||||||
mac*)
|
|
||||||
os=`echo "$os" | sed -e 's|mac|macos|'`
|
|
||||||
;;
|
|
||||||
linux-dietlibc)
|
linux-dietlibc)
|
||||||
os=linux-dietlibc
|
os=linux-dietlibc
|
||||||
;;
|
;;
|
||||||
linux*)
|
linux*)
|
||||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||||
;;
|
;;
|
||||||
sunos5*)
|
lynx*178)
|
||||||
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
|
os=lynxos178
|
||||||
;;
|
;;
|
||||||
sunos6*)
|
lynx*5)
|
||||||
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
|
os=lynxos5
|
||||||
|
;;
|
||||||
|
lynx*)
|
||||||
|
os=lynxos
|
||||||
|
;;
|
||||||
|
mac*)
|
||||||
|
os=`echo "$os" | sed -e 's|mac|macos|'`
|
||||||
;;
|
;;
|
||||||
opened*)
|
opened*)
|
||||||
os=openedition
|
os=openedition
|
||||||
|
|
@ -1466,6 +1424,12 @@ case $os in
|
||||||
os400*)
|
os400*)
|
||||||
os=os400
|
os=os400
|
||||||
;;
|
;;
|
||||||
|
sunos5*)
|
||||||
|
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
|
||||||
|
;;
|
||||||
|
sunos6*)
|
||||||
|
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
|
||||||
|
;;
|
||||||
wince*)
|
wince*)
|
||||||
os=wince
|
os=wince
|
||||||
;;
|
;;
|
||||||
|
|
@ -1599,6 +1563,9 @@ case $basic_machine in
|
||||||
c8051-*)
|
c8051-*)
|
||||||
os=elf
|
os=elf
|
||||||
;;
|
;;
|
||||||
|
clipper-intergraph)
|
||||||
|
os=clix
|
||||||
|
;;
|
||||||
hexagon-*)
|
hexagon-*)
|
||||||
os=elf
|
os=elf
|
||||||
;;
|
;;
|
||||||
|
|
@ -1744,6 +1711,9 @@ case $basic_machine in
|
||||||
*-atari*)
|
*-atari*)
|
||||||
os=mint
|
os=mint
|
||||||
;;
|
;;
|
||||||
|
*-wrs)
|
||||||
|
os=vxworks
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
os=none
|
os=none
|
||||||
;;
|
;;
|
||||||
|
|
@ -1789,6 +1759,9 @@ case $basic_machine in
|
||||||
genix*)
|
genix*)
|
||||||
vendor=ns
|
vendor=ns
|
||||||
;;
|
;;
|
||||||
|
clix*)
|
||||||
|
vendor=intergraph
|
||||||
|
;;
|
||||||
mvs* | opened*)
|
mvs* | opened*)
|
||||||
vendor=ibm
|
vendor=ibm
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
|
|
@ -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{2018-03-10.14}
|
\def\texinfoversion{2018-06-02.09}
|
||||||
%
|
%
|
||||||
% 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,
|
||||||
|
|
@ -1528,6 +1528,9 @@ output) for that.)}
|
||||||
\startlink attr{/Border [0 0 0]}%
|
\startlink attr{/Border [0 0 0]}%
|
||||||
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
|
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
|
||||||
\endgroup}
|
\endgroup}
|
||||||
|
% \pdfgettoks - Surround page numbers in #1 with @pdflink. #1 may
|
||||||
|
% be a simple number, or a list of numbers in the case of an index
|
||||||
|
% entry.
|
||||||
\def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
|
\def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
|
||||||
\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
|
\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
|
||||||
\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
|
\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,7 @@ acl_nontrivial (int count, struct acl_entry *entries)
|
||||||
struct acl_entry *ace = &entries[i];
|
struct acl_entry *ace = &entries[i];
|
||||||
|
|
||||||
if (ace->uid != ACL_NSUSER && ace->gid != ACL_NSGROUP)
|
if (ace->uid != ACL_NSUSER && ace->gid != ACL_NSGROUP)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -293,10 +293,6 @@ struct permission_context {
|
||||||
|
|
||||||
int get_permissions (const char *, int, mode_t, struct permission_context *);
|
int get_permissions (const char *, int, mode_t, struct permission_context *);
|
||||||
int set_permissions (struct permission_context *, const char *, int);
|
int set_permissions (struct permission_context *, const char *, int);
|
||||||
void free_permission_context (struct permission_context *)
|
void free_permission_context (struct permission_context *);
|
||||||
#if ! (defined USE_ACL && (HAVE_ACL_GET_FILE || defined GETACL))
|
|
||||||
_GL_ATTRIBUTE_CONST
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
_GL_INLINE_HEADER_END
|
_GL_INLINE_HEADER_END
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
int
|
int
|
||||||
get_permissions (const char *name, int desc, mode_t mode,
|
get_permissions (const char *name, int desc, mode_t mode,
|
||||||
struct permission_context *ctx)
|
struct permission_context *ctx)
|
||||||
{
|
{
|
||||||
memset (ctx, 0, sizeof *ctx);
|
memset (ctx, 0, sizeof *ctx);
|
||||||
ctx->mode = mode;
|
ctx->mode = mode;
|
||||||
|
|
@ -57,7 +57,7 @@ get_permissions (const char *name, int desc, mode_t mode,
|
||||||
{
|
{
|
||||||
ctx->default_acl = acl_get_file (name, ACL_TYPE_DEFAULT);
|
ctx->default_acl = acl_get_file (name, ACL_TYPE_DEFAULT);
|
||||||
if (ctx->default_acl == NULL)
|
if (ctx->default_acl == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# if HAVE_ACL_TYPE_NFS4 /* FreeBSD */
|
# if HAVE_ACL_TYPE_NFS4 /* FreeBSD */
|
||||||
|
|
@ -115,16 +115,16 @@ get_permissions (const char *name, int desc, mode_t mode,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (desc != -1)
|
if (desc != -1)
|
||||||
ret = facl (desc, ACE_GETACLCNT, 0, NULL);
|
ret = facl (desc, ACE_GETACLCNT, 0, NULL);
|
||||||
else
|
else
|
||||||
ret = acl (name, ACE_GETACLCNT, 0, NULL);
|
ret = acl (name, ACE_GETACLCNT, 0, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS || errno == EINVAL)
|
if (errno == ENOSYS || errno == EINVAL)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ctx->ace_count = ret;
|
ctx->ace_count = ret;
|
||||||
|
|
||||||
if (ctx->ace_count == 0)
|
if (ctx->ace_count == 0)
|
||||||
|
|
@ -138,15 +138,15 @@ get_permissions (const char *name, int desc, mode_t mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (desc != -1)
|
if (desc != -1)
|
||||||
ret = facl (desc, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
|
ret = facl (desc, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
|
||||||
else
|
else
|
||||||
ret = acl (name, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
|
ret = acl (name, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS || errno == EINVAL)
|
if (errno == ENOSYS || errno == EINVAL)
|
||||||
{
|
{
|
||||||
free (ctx->ace_entries);
|
free (ctx->ace_entries);
|
||||||
ctx->ace_entries = NULL;
|
ctx->ace_entries = NULL;
|
||||||
ctx->ace_count = 0;
|
ctx->ace_count = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -154,10 +154,10 @@ get_permissions (const char *name, int desc, mode_t mode,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (ret <= ctx->ace_count)
|
if (ret <= ctx->ace_count)
|
||||||
{
|
{
|
||||||
ctx->ace_count = ret;
|
ctx->ace_count = ret;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Huh? The number of ACL entries has increased since the last call.
|
/* Huh? The number of ACL entries has increased since the last call.
|
||||||
Repeat. */
|
Repeat. */
|
||||||
free (ctx->ace_entries);
|
free (ctx->ace_entries);
|
||||||
|
|
@ -170,20 +170,20 @@ get_permissions (const char *name, int desc, mode_t mode,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (desc != -1)
|
if (desc != -1)
|
||||||
ret = facl (desc, GETACLCNT, 0, NULL);
|
ret = facl (desc, GETACLCNT, 0, NULL);
|
||||||
else
|
else
|
||||||
ret = acl (name, GETACLCNT, 0, NULL);
|
ret = acl (name, GETACLCNT, 0, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
|
if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ctx->count = ret;
|
ctx->count = ret;
|
||||||
|
|
||||||
if (ctx->count == 0)
|
if (ctx->count == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ctx->entries = (aclent_t *) malloc (ctx->count * sizeof (aclent_t));
|
ctx->entries = (aclent_t *) malloc (ctx->count * sizeof (aclent_t));
|
||||||
if (ctx->entries == NULL)
|
if (ctx->entries == NULL)
|
||||||
|
|
@ -193,26 +193,26 @@ get_permissions (const char *name, int desc, mode_t mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (desc != -1)
|
if (desc != -1)
|
||||||
ret = facl (desc, GETACL, ctx->count, ctx->entries);
|
ret = facl (desc, GETACL, ctx->count, ctx->entries);
|
||||||
else
|
else
|
||||||
ret = acl (name, GETACL, ctx->count, ctx->entries);
|
ret = acl (name, GETACL, ctx->count, ctx->entries);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
|
if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
|
||||||
{
|
{
|
||||||
free (ctx->entries);
|
free (ctx->entries);
|
||||||
ctx->entries = NULL;
|
ctx->entries = NULL;
|
||||||
ctx->count = 0;
|
ctx->count = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (ret <= ctx->count)
|
if (ret <= ctx->count)
|
||||||
{
|
{
|
||||||
ctx->count = ret;
|
ctx->count = ret;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Huh? The number of ACL entries has increased since the last call.
|
/* Huh? The number of ACL entries has increased since the last call.
|
||||||
Repeat. */
|
Repeat. */
|
||||||
free (ctx->entries);
|
free (ctx->entries);
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
UMAX
|
UMAX
|
||||||
UMAX4_3
|
UMAX4_3
|
||||||
VMS
|
VMS
|
||||||
WINDOWS32 No-op for Windows95/NT.
|
_WIN32 Native Windows (possibly also defined on Cygwin)
|
||||||
__linux__ Linux: assumes /proc file system mounted.
|
__linux__ Linux: assumes /proc file system mounted.
|
||||||
Support from Michael K. Johnson.
|
Support from Michael K. Johnson.
|
||||||
__CYGWIN__ Cygwin emulates linux /proc/loadavg.
|
__CYGWIN__ Cygwin emulates linux /proc/loadavg.
|
||||||
|
|
@ -97,6 +97,10 @@
|
||||||
|
|
||||||
# include "intprops.h"
|
# include "intprops.h"
|
||||||
|
|
||||||
|
# if defined _WIN32 && ! defined __CYGWIN__
|
||||||
|
# define WINDOWS32
|
||||||
|
# endif
|
||||||
|
|
||||||
# if !defined (BSD) && defined (ultrix)
|
# if !defined (BSD) && defined (ultrix)
|
||||||
/* Ultrix behaves like BSD on Vaxen. */
|
/* Ultrix behaves like BSD on Vaxen. */
|
||||||
# define BSD
|
# define BSD
|
||||||
|
|
@ -324,7 +328,9 @@
|
||||||
# define LDAV_SYMBOL "avenrun"
|
# define LDAV_SYMBOL "avenrun"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# include <unistd.h>
|
# ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
/* LOAD_AVE_TYPE should only get defined if we're going to use the
|
/* LOAD_AVE_TYPE should only get defined if we're going to use the
|
||||||
nlist method. */
|
nlist method. */
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ initialize (void)
|
||||||
if (kernel32 != NULL)
|
if (kernel32 != NULL)
|
||||||
{
|
{
|
||||||
GetSystemTimePreciseAsFileTimeFunc =
|
GetSystemTimePreciseAsFileTimeFunc =
|
||||||
(GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");
|
(GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");
|
||||||
}
|
}
|
||||||
initialized = TRUE;
|
initialized = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
18
lib/md5.c
18
lib/md5.c
|
|
@ -52,9 +52,9 @@
|
||||||
# define md5_buffer __md5_buffer
|
# define md5_buffer __md5_buffer
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <byteswap.h>
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
# define SWAP(n) \
|
# define SWAP(n) bswap_32 (n)
|
||||||
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
|
|
||||||
#else
|
#else
|
||||||
# define SWAP(n) (n)
|
# define SWAP(n) (n)
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -170,6 +170,14 @@ md5_stream (FILE *stream, void *resblock)
|
||||||
/* Read block. Take care for partial reads. */
|
/* Read block. Take care for partial reads. */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
/* Either process a partial fread() from this loop,
|
||||||
|
or the fread() in afalg_stream may have gotten EOF.
|
||||||
|
We need to avoid a subsequent fread() as EOF may
|
||||||
|
not be sticky. For details of such systems, see:
|
||||||
|
https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */
|
||||||
|
if (feof (stream))
|
||||||
|
goto process_partial_block;
|
||||||
|
|
||||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||||
|
|
||||||
sum += n;
|
sum += n;
|
||||||
|
|
@ -189,12 +197,6 @@ md5_stream (FILE *stream, void *resblock)
|
||||||
}
|
}
|
||||||
goto process_partial_block;
|
goto process_partial_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We've read at least one byte, so ignore errors. But always
|
|
||||||
check for EOF, since feof may be true even though N > 0.
|
|
||||||
Otherwise, we could end up calling fread after EOF. */
|
|
||||||
if (feof (stream))
|
|
||||||
goto process_partial_block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process buffer with BLOCKSIZE bytes. Note that
|
/* Process buffer with BLOCKSIZE bytes. Note that
|
||||||
|
|
|
||||||
|
|
@ -83,9 +83,9 @@ pselect (int nfds, fd_set *restrict rfds,
|
||||||
|
|
||||||
int
|
int
|
||||||
rpl_pselect (int nfds, fd_set *restrict rfds,
|
rpl_pselect (int nfds, fd_set *restrict rfds,
|
||||||
fd_set *restrict wfds, fd_set *restrict xfds,
|
fd_set *restrict wfds, fd_set *restrict xfds,
|
||||||
struct timespec const *restrict timeout,
|
struct timespec const *restrict timeout,
|
||||||
sigset_t const *restrict sigmask)
|
sigset_t const *restrict sigmask)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -229,14 +229,14 @@ set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
|
||||||
if (ret < 0 && errno != EINVAL && errno != ENOTSUP)
|
if (ret < 0 && errno != EINVAL && errno != ENOTSUP)
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS)
|
if (errno == ENOSYS)
|
||||||
{
|
{
|
||||||
*must_chmod = true;
|
*must_chmod = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
@ -256,18 +256,18 @@ set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
|
||||||
|
|
||||||
if (desc != -1)
|
if (desc != -1)
|
||||||
ret = facl (desc, SETACL,
|
ret = facl (desc, SETACL,
|
||||||
sizeof (entries) / sizeof (aclent_t), entries);
|
sizeof (entries) / sizeof (aclent_t), entries);
|
||||||
else
|
else
|
||||||
ret = acl (name, SETACL,
|
ret = acl (name, SETACL,
|
||||||
sizeof (entries) / sizeof (aclent_t), entries);
|
sizeof (entries) / sizeof (aclent_t), entries);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS || errno == EOPNOTSUPP)
|
if (errno == ENOSYS || errno == EOPNOTSUPP)
|
||||||
{
|
{
|
||||||
*must_chmod = true;
|
*must_chmod = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -483,7 +483,7 @@ context_acl_from_mode (struct permission_context *ctx)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
set_acls (struct permission_context *ctx, const char *name, int desc,
|
set_acls (struct permission_context *ctx, const char *name, int desc,
|
||||||
int from_mode, bool *must_chmod, bool *acls_set)
|
int from_mode, bool *must_chmod, bool *acls_set)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
|
@ -503,43 +503,43 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
|
||||||
if (! ctx->acls_not_supported)
|
if (! ctx->acls_not_supported)
|
||||||
{
|
{
|
||||||
if (ret == 0 && from_mode)
|
if (ret == 0 && from_mode)
|
||||||
{
|
{
|
||||||
if (ctx->acl)
|
if (ctx->acl)
|
||||||
acl_free (ctx->acl);
|
acl_free (ctx->acl);
|
||||||
ctx->acl = acl_from_mode (ctx->mode);
|
ctx->acl = acl_from_mode (ctx->mode);
|
||||||
if (ctx->acl == NULL)
|
if (ctx->acl == NULL)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 0 && ctx->acl)
|
if (ret == 0 && ctx->acl)
|
||||||
{
|
{
|
||||||
if (HAVE_ACL_SET_FD && desc != -1)
|
if (HAVE_ACL_SET_FD && desc != -1)
|
||||||
ret = acl_set_fd (desc, ctx->acl);
|
ret = acl_set_fd (desc, ctx->acl);
|
||||||
else
|
else
|
||||||
ret = acl_set_file (name, ACL_TYPE_ACCESS, ctx->acl);
|
ret = acl_set_file (name, ACL_TYPE_ACCESS, ctx->acl);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
{
|
{
|
||||||
if (! acl_errno_valid (errno))
|
if (! acl_errno_valid (errno))
|
||||||
{
|
{
|
||||||
ctx->acls_not_supported = true;
|
ctx->acls_not_supported = true;
|
||||||
if (from_mode || acl_access_nontrivial (ctx->acl) == 0)
|
if (from_mode || acl_access_nontrivial (ctx->acl) == 0)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*acls_set = true;
|
*acls_set = true;
|
||||||
if (S_ISDIR(ctx->mode))
|
if (S_ISDIR(ctx->mode))
|
||||||
{
|
{
|
||||||
if (! from_mode && ctx->default_acl &&
|
if (! from_mode && ctx->default_acl &&
|
||||||
acl_default_nontrivial (ctx->default_acl))
|
acl_default_nontrivial (ctx->default_acl))
|
||||||
ret = acl_set_file (name, ACL_TYPE_DEFAULT,
|
ret = acl_set_file (name, ACL_TYPE_DEFAULT,
|
||||||
ctx->default_acl);
|
ctx->default_acl);
|
||||||
else
|
else
|
||||||
ret = acl_delete_def_file (name);
|
ret = acl_delete_def_file (name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# if HAVE_ACL_TYPE_NFS4 /* FreeBSD */
|
# if HAVE_ACL_TYPE_NFS4 /* FreeBSD */
|
||||||
|
|
@ -573,38 +573,38 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
|
||||||
|
|
||||||
/* Remove ACLs if the file has ACLs. */
|
/* Remove ACLs if the file has ACLs. */
|
||||||
if (HAVE_ACL_GET_FD && desc != -1)
|
if (HAVE_ACL_GET_FD && desc != -1)
|
||||||
acl = acl_get_fd (desc);
|
acl = acl_get_fd (desc);
|
||||||
else
|
else
|
||||||
acl = acl_get_file (name, ACL_TYPE_EXTENDED);
|
acl = acl_get_file (name, ACL_TYPE_EXTENDED);
|
||||||
if (acl)
|
if (acl)
|
||||||
{
|
{
|
||||||
acl_free (acl);
|
acl_free (acl);
|
||||||
|
|
||||||
acl = acl_init (0);
|
acl = acl_init (0);
|
||||||
if (acl)
|
if (acl)
|
||||||
{
|
{
|
||||||
if (HAVE_ACL_SET_FD && desc != -1)
|
if (HAVE_ACL_SET_FD && desc != -1)
|
||||||
ret = acl_set_fd (desc, acl);
|
ret = acl_set_fd (desc, acl);
|
||||||
else
|
else
|
||||||
ret = acl_set_file (name, ACL_TYPE_EXTENDED, acl);
|
ret = acl_set_file (name, ACL_TYPE_EXTENDED, acl);
|
||||||
acl_free (acl);
|
acl_free (acl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (HAVE_ACL_SET_FD && desc != -1)
|
if (HAVE_ACL_SET_FD && desc != -1)
|
||||||
ret = acl_set_fd (desc, ctx->acl);
|
ret = acl_set_fd (desc, ctx->acl);
|
||||||
else
|
else
|
||||||
ret = acl_set_file (name, ACL_TYPE_EXTENDED, ctx->acl);
|
ret = acl_set_file (name, ACL_TYPE_EXTENDED, ctx->acl);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
{
|
{
|
||||||
if (! acl_errno_valid (errno)
|
if (! acl_errno_valid (errno)
|
||||||
&& ! acl_extended_nontrivial (ctx->acl))
|
&& ! acl_extended_nontrivial (ctx->acl))
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*acls_set = true;
|
*acls_set = true;
|
||||||
|
|
||||||
|
|
@ -626,34 +626,34 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
|
||||||
if (ret == 0 && ctx->count)
|
if (ret == 0 && ctx->count)
|
||||||
{
|
{
|
||||||
if (desc != -1)
|
if (desc != -1)
|
||||||
ret = facl (desc, SETACL, ctx->count, ctx->entries);
|
ret = facl (desc, SETACL, ctx->count, ctx->entries);
|
||||||
else
|
else
|
||||||
ret = acl (name, SETACL, ctx->count, ctx->entries);
|
ret = acl (name, SETACL, ctx->count, ctx->entries);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
|
if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
|
||||||
&& acl_nontrivial (ctx->count, ctx->entries) == 0)
|
&& acl_nontrivial (ctx->count, ctx->entries) == 0)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*acls_set = true;
|
*acls_set = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef ACE_GETACL
|
# ifdef ACE_GETACL
|
||||||
if (ret == 0 && ctx->ace_count)
|
if (ret == 0 && ctx->ace_count)
|
||||||
{
|
{
|
||||||
if (desc != -1)
|
if (desc != -1)
|
||||||
ret = facl (desc, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
|
ret = facl (desc, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
|
||||||
else
|
else
|
||||||
ret = acl (name, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
|
ret = acl (name, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
|
if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
|
||||||
&& acl_ace_nontrivial (ctx->ace_count, ctx->ace_entries) == 0)
|
&& acl_ace_nontrivial (ctx->ace_count, ctx->ace_entries) == 0)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*acls_set = true;
|
*acls_set = true;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
@ -665,17 +665,17 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
|
||||||
if (ret == 0 && ctx->count > 0)
|
if (ret == 0 && ctx->count > 0)
|
||||||
{
|
{
|
||||||
if (desc != -1)
|
if (desc != -1)
|
||||||
ret = fsetacl (desc, ctx->count, ctx->entries);
|
ret = fsetacl (desc, ctx->count, ctx->entries);
|
||||||
else
|
else
|
||||||
ret = setacl (name, ctx->count, ctx->entries);
|
ret = setacl (name, ctx->count, ctx->entries);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
|
if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
|
||||||
&& (from_mode || !acl_nontrivial (ctx->count, ctx->entries)))
|
&& (from_mode || !acl_nontrivial (ctx->count, ctx->entries)))
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*acls_set = true;
|
*acls_set = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
# if HAVE_ACLV_H
|
# if HAVE_ACLV_H
|
||||||
|
|
@ -686,13 +686,13 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
|
||||||
{
|
{
|
||||||
ret = acl ((char *) name, ACL_SET, ctx->aclv_count, ctx->aclv_entries);
|
ret = acl ((char *) name, ACL_SET, ctx->aclv_count, ctx->aclv_entries);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
|
if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
|
||||||
&& (from_mode || !aclv_nontrivial (ctx->aclv_count, ctx->aclv_entries)))
|
&& (from_mode || !aclv_nontrivial (ctx->aclv_count, ctx->aclv_entries)))
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*acls_set = true;
|
*acls_set = true;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
@ -711,16 +711,16 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
|
||||||
if (ret == 0 && ctx->have_u)
|
if (ret == 0 && ctx->have_u)
|
||||||
{
|
{
|
||||||
if (desc != -1)
|
if (desc != -1)
|
||||||
ret = fchacl (desc, &ctx->u.a, ctx->u.a.acl_len);
|
ret = fchacl (desc, &ctx->u.a, ctx->u.a.acl_len);
|
||||||
else
|
else
|
||||||
ret = chacl ((char *) name, &ctx->u.a, ctx->u.a.acl_len);
|
ret = chacl ((char *) name, &ctx->u.a, ctx->u.a.acl_len);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS && from_mode)
|
if (errno == ENOSYS && from_mode)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*acls_set = true;
|
*acls_set = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
# elif HAVE_ACLSORT /* NonStop Kernel */
|
# elif HAVE_ACLSORT /* NonStop Kernel */
|
||||||
|
|
@ -732,12 +732,12 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
|
||||||
{
|
{
|
||||||
ret = acl ((char *) name, ACL_SET, ctx->count, ctx->entries);
|
ret = acl ((char *) name, ACL_SET, ctx->count, ctx->entries);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
{
|
{
|
||||||
if (!acl_nontrivial (ctx->count, ctx->entries))
|
if (!acl_nontrivial (ctx->count, ctx->entries))
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*acls_set = true;
|
*acls_set = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
# else /* No ACLs */
|
# else /* No ACLs */
|
||||||
|
|
@ -805,7 +805,7 @@ set_permissions (struct permission_context *ctx, const char *name, int desc)
|
||||||
{
|
{
|
||||||
ret = chmod_or_fchmod (name, desc, ctx->mode);
|
ret = chmod_or_fchmod (name, desc, ctx->mode);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_ACL
|
#if USE_ACL
|
||||||
|
|
@ -815,18 +815,18 @@ set_permissions (struct permission_context *ctx, const char *name, int desc)
|
||||||
int saved_errno = ret ? errno : 0;
|
int saved_errno = ret ? errno : 0;
|
||||||
|
|
||||||
/* If we can't set an acl which we expect to be able to set, try setting
|
/* If we can't set an acl which we expect to be able to set, try setting
|
||||||
the permissions to ctx->mode. Due to possible inherited permissions,
|
the permissions to ctx->mode. Due to possible inherited permissions,
|
||||||
we cannot simply chmod. */
|
we cannot simply chmod. */
|
||||||
|
|
||||||
ret = set_acls (ctx, name, desc, true, &must_chmod, &acls_set);
|
ret = set_acls (ctx, name, desc, true, &must_chmod, &acls_set);
|
||||||
if (! acls_set)
|
if (! acls_set)
|
||||||
must_chmod = true;
|
must_chmod = true;
|
||||||
|
|
||||||
if (saved_errno)
|
if (saved_errno)
|
||||||
{
|
{
|
||||||
errno = saved_errno;
|
errno = saved_errno;
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -837,10 +837,10 @@ set_permissions (struct permission_context *ctx, const char *name, int desc)
|
||||||
ret = chmod_or_fchmod (name, desc, ctx->mode);
|
ret = chmod_or_fchmod (name, desc, ctx->mode);
|
||||||
|
|
||||||
if (saved_errno)
|
if (saved_errno)
|
||||||
{
|
{
|
||||||
errno = saved_errno;
|
errno = saved_errno;
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
18
lib/sha1.c
18
lib/sha1.c
|
|
@ -37,11 +37,11 @@
|
||||||
# include "unlocked-io.h"
|
# include "unlocked-io.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <byteswap.h>
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
# define SWAP(n) (n)
|
# define SWAP(n) (n)
|
||||||
#else
|
#else
|
||||||
# define SWAP(n) \
|
# define SWAP(n) bswap_32 (n)
|
||||||
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BLOCKSIZE 32768
|
#define BLOCKSIZE 32768
|
||||||
|
|
@ -158,6 +158,14 @@ sha1_stream (FILE *stream, void *resblock)
|
||||||
/* Read block. Take care for partial reads. */
|
/* Read block. Take care for partial reads. */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
/* Either process a partial fread() from this loop,
|
||||||
|
or the fread() in afalg_stream may have gotten EOF.
|
||||||
|
We need to avoid a subsequent fread() as EOF may
|
||||||
|
not be sticky. For details of such systems, see:
|
||||||
|
https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */
|
||||||
|
if (feof (stream))
|
||||||
|
goto process_partial_block;
|
||||||
|
|
||||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||||
|
|
||||||
sum += n;
|
sum += n;
|
||||||
|
|
@ -177,12 +185,6 @@ sha1_stream (FILE *stream, void *resblock)
|
||||||
}
|
}
|
||||||
goto process_partial_block;
|
goto process_partial_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We've read at least one byte, so ignore errors. But always
|
|
||||||
check for EOF, since feof may be true even though N > 0.
|
|
||||||
Otherwise, we could end up calling fread after EOF. */
|
|
||||||
if (feof (stream))
|
|
||||||
goto process_partial_block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process buffer with BLOCKSIZE bytes. Note that
|
/* Process buffer with BLOCKSIZE bytes. Note that
|
||||||
|
|
|
||||||
18
lib/sha256.c
18
lib/sha256.c
|
|
@ -36,11 +36,11 @@
|
||||||
# include "unlocked-io.h"
|
# include "unlocked-io.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <byteswap.h>
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
# define SWAP(n) (n)
|
# define SWAP(n) (n)
|
||||||
#else
|
#else
|
||||||
# define SWAP(n) \
|
# define SWAP(n) bswap_32 (n)
|
||||||
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BLOCKSIZE 32768
|
#define BLOCKSIZE 32768
|
||||||
|
|
@ -208,6 +208,14 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
|
||||||
/* Read block. Take care for partial reads. */
|
/* Read block. Take care for partial reads. */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
/* Either process a partial fread() from this loop,
|
||||||
|
or the fread() in afalg_stream may have gotten EOF.
|
||||||
|
We need to avoid a subsequent fread() as EOF may
|
||||||
|
not be sticky. For details of such systems, see:
|
||||||
|
https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */
|
||||||
|
if (feof (stream))
|
||||||
|
goto process_partial_block;
|
||||||
|
|
||||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||||
|
|
||||||
sum += n;
|
sum += n;
|
||||||
|
|
@ -227,12 +235,6 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
|
||||||
}
|
}
|
||||||
goto process_partial_block;
|
goto process_partial_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We've read at least one byte, so ignore errors. But always
|
|
||||||
check for EOF, since feof may be true even though N > 0.
|
|
||||||
Otherwise, we could end up calling fread after EOF. */
|
|
||||||
if (feof (stream))
|
|
||||||
goto process_partial_block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process buffer with BLOCKSIZE bytes. Note that
|
/* Process buffer with BLOCKSIZE bytes. Note that
|
||||||
|
|
|
||||||
25
lib/sha512.c
25
lib/sha512.c
|
|
@ -36,18 +36,11 @@
|
||||||
# include "unlocked-io.h"
|
# include "unlocked-io.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <byteswap.h>
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
# define SWAP(n) (n)
|
# define SWAP(n) (n)
|
||||||
#else
|
#else
|
||||||
# define SWAP(n) \
|
# define SWAP(n) bswap_64 (n)
|
||||||
u64or (u64or (u64or (u64shl (n, 56), \
|
|
||||||
u64shl (u64and (n, u64lo (0x0000ff00)), 40)), \
|
|
||||||
u64or (u64shl (u64and (n, u64lo (0x00ff0000)), 24), \
|
|
||||||
u64shl (u64and (n, u64lo (0xff000000)), 8))), \
|
|
||||||
u64or (u64or (u64and (u64shr (n, 8), u64lo (0xff000000)), \
|
|
||||||
u64and (u64shr (n, 24), u64lo (0x00ff0000))), \
|
|
||||||
u64or (u64and (u64shr (n, 40), u64lo (0x0000ff00)), \
|
|
||||||
u64shr (n, 56))))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BLOCKSIZE 32768
|
#define BLOCKSIZE 32768
|
||||||
|
|
@ -216,6 +209,14 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
|
||||||
/* Read block. Take care for partial reads. */
|
/* Read block. Take care for partial reads. */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
/* Either process a partial fread() from this loop,
|
||||||
|
or the fread() in afalg_stream may have gotten EOF.
|
||||||
|
We need to avoid a subsequent fread() as EOF may
|
||||||
|
not be sticky. For details of such systems, see:
|
||||||
|
https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */
|
||||||
|
if (feof (stream))
|
||||||
|
goto process_partial_block;
|
||||||
|
|
||||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||||
|
|
||||||
sum += n;
|
sum += n;
|
||||||
|
|
@ -235,12 +236,6 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
|
||||||
}
|
}
|
||||||
goto process_partial_block;
|
goto process_partial_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We've read at least one byte, so ignore errors. But always
|
|
||||||
check for EOF, since feof may be true even though N > 0.
|
|
||||||
Otherwise, we could end up calling fread after EOF. */
|
|
||||||
if (feof (stream))
|
|
||||||
goto process_partial_block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process buffer with BLOCKSIZE bytes. Note that
|
/* Process buffer with BLOCKSIZE bytes. Note that
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ _GL_CXXALIASWARN (gmtime_r);
|
||||||
# define localtime rpl_localtime
|
# define localtime rpl_localtime
|
||||||
# endif
|
# endif
|
||||||
_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
|
_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
|
||||||
_GL_ARG_NONNULL ((1)));
|
_GL_ARG_NONNULL ((1)));
|
||||||
_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
|
_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
|
||||||
# else
|
# else
|
||||||
_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
|
_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ AC_DEFUN([gl_PREREQ_GETLOADAVG],
|
||||||
[
|
[
|
||||||
# Figure out what our getloadavg.c needs.
|
# Figure out what our getloadavg.c needs.
|
||||||
|
|
||||||
AC_CHECK_HEADERS_ONCE([sys/param.h])
|
AC_CHECK_HEADERS_ONCE([sys/param.h unistd.h])
|
||||||
|
|
||||||
# On HPUX9, an unprivileged user can get load averages this way.
|
# On HPUX9, an unprivileged user can get load averages this way.
|
||||||
if test $gl_func_getloadavg_done = no; then
|
if test $gl_func_getloadavg_done = no; then
|
||||||
|
|
|
||||||
|
|
@ -354,16 +354,16 @@ AC_DEFUN([AC_C_RESTRICT],
|
||||||
for ac_kw in __restrict __restrict__ _Restrict restrict; do
|
for ac_kw in __restrict __restrict__ _Restrict restrict; do
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM(
|
[AC_LANG_PROGRAM(
|
||||||
[[typedef int *int_ptr;
|
[[typedef int *int_ptr;
|
||||||
int foo (int_ptr $ac_kw ip) { return ip[0]; }
|
int foo (int_ptr $ac_kw ip) { return ip[0]; }
|
||||||
int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
|
int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
|
||||||
int bar (int ip[$ac_kw]) { return ip[0]; }
|
int bar (int ip[$ac_kw]) { return ip[0]; }
|
||||||
]],
|
]],
|
||||||
[[int s[1];
|
[[int s[1];
|
||||||
int *$ac_kw t = s;
|
int *$ac_kw t = s;
|
||||||
t[0] = 0;
|
t[0] = 0;
|
||||||
return foo (t) + bar (t);
|
return foo (t) + bar (t);
|
||||||
]])],
|
]])],
|
||||||
[ac_cv_c_restrict=$ac_kw])
|
[ac_cv_c_restrict=$ac_kw])
|
||||||
test "$ac_cv_c_restrict" != no && break
|
test "$ac_cv_c_restrict" != no && break
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# manywarnings.m4 serial 14
|
# manywarnings.m4 serial 15
|
||||||
dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
|
dnl Copyright (C) 2008-2018 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,
|
||||||
|
|
@ -108,12 +108,11 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
|
||||||
# comm -3 \
|
# comm -3 \
|
||||||
# <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
|
# <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
|
||||||
# awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
|
# awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
|
||||||
# <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
|
# <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
|
||||||
|
|
||||||
gl_manywarn_set=
|
gl_manywarn_set=
|
||||||
for gl_manywarn_item in -fno-common \
|
for gl_manywarn_item in -fno-common \
|
||||||
-W \
|
-W \
|
||||||
-Wabi \
|
|
||||||
-Waddress \
|
-Waddress \
|
||||||
-Waggressive-loop-optimizations \
|
-Waggressive-loop-optimizations \
|
||||||
-Wall \
|
-Wall \
|
||||||
|
|
@ -128,7 +127,6 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
|
||||||
-Wcast-align=strict \
|
-Wcast-align=strict \
|
||||||
-Wcast-function-type \
|
-Wcast-function-type \
|
||||||
-Wchar-subscripts \
|
-Wchar-subscripts \
|
||||||
-Wchkp \
|
|
||||||
-Wclobbered \
|
-Wclobbered \
|
||||||
-Wcomment \
|
-Wcomment \
|
||||||
-Wcomments \
|
-Wcomments \
|
||||||
|
|
@ -176,7 +174,6 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
|
||||||
-Wint-to-pointer-cast \
|
-Wint-to-pointer-cast \
|
||||||
-Winvalid-memory-model \
|
-Winvalid-memory-model \
|
||||||
-Winvalid-pch \
|
-Winvalid-pch \
|
||||||
-Wjump-misses-init \
|
|
||||||
-Wlogical-not-parentheses \
|
-Wlogical-not-parentheses \
|
||||||
-Wlogical-op \
|
-Wlogical-op \
|
||||||
-Wmain \
|
-Wmain \
|
||||||
|
|
|
||||||
|
|
@ -124,41 +124,41 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
|
||||||
case " $LIBS " in
|
case " $LIBS " in
|
||||||
*' -pthread '*) ;;
|
*' -pthread '*) ;;
|
||||||
*' -lpthread '*) ;;
|
*' -lpthread '*) ;;
|
||||||
*)
|
*)
|
||||||
AC_CACHE_CHECK([whether pthread_sigmask works without -lpthread],
|
AC_CACHE_CHECK([whether pthread_sigmask works without -lpthread],
|
||||||
[gl_cv_func_pthread_sigmask_in_libc_works],
|
[gl_cv_func_pthread_sigmask_in_libc_works],
|
||||||
[
|
[
|
||||||
AC_RUN_IFELSE(
|
AC_RUN_IFELSE(
|
||||||
[AC_LANG_SOURCE([[
|
[AC_LANG_SOURCE([[
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
sigset_t set;
|
sigset_t set;
|
||||||
sigemptyset (&set);
|
sigemptyset (&set);
|
||||||
return pthread_sigmask (1729, &set, NULL) != 0;
|
return pthread_sigmask (1729, &set, NULL) != 0;
|
||||||
}]])],
|
}]])],
|
||||||
[gl_cv_func_pthread_sigmask_in_libc_works=no],
|
[gl_cv_func_pthread_sigmask_in_libc_works=no],
|
||||||
[gl_cv_func_pthread_sigmask_in_libc_works=yes],
|
[gl_cv_func_pthread_sigmask_in_libc_works=yes],
|
||||||
[
|
[
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
freebsd* | hpux* | solaris | solaris2.[2-9]*)
|
freebsd* | hpux* | solaris | solaris2.[2-9]*)
|
||||||
gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
|
gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
|
||||||
*)
|
*)
|
||||||
gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
|
gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
|
||||||
esac
|
esac
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
case "$gl_cv_func_pthread_sigmask_in_libc_works" in
|
case "$gl_cv_func_pthread_sigmask_in_libc_works" in
|
||||||
*no)
|
*no)
|
||||||
REPLACE_PTHREAD_SIGMASK=1
|
REPLACE_PTHREAD_SIGMASK=1
|
||||||
AC_DEFINE([PTHREAD_SIGMASK_INEFFECTIVE], [1],
|
AC_DEFINE([PTHREAD_SIGMASK_INEFFECTIVE], [1],
|
||||||
[Define to 1 if pthread_sigmask may return 0 and have no effect.])
|
[Define to 1 if pthread_sigmask may return 0 and have no effect.])
|
||||||
;;
|
;;
|
||||||
esac;;
|
esac;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,44 +18,44 @@ AC_DEFUN([AC_C_VARARRAYS],
|
||||||
ac_cv_c_vararrays,
|
ac_cv_c_vararrays,
|
||||||
[AC_EGREP_CPP([defined],
|
[AC_EGREP_CPP([defined],
|
||||||
[#ifdef __STDC_NO_VLA__
|
[#ifdef __STDC_NO_VLA__
|
||||||
defined
|
defined
|
||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
[ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
|
[ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
|
||||||
[AC_COMPILE_IFELSE(
|
[AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM(
|
[AC_LANG_PROGRAM(
|
||||||
[[/* Test for VLA support. This test is partly inspired
|
[[/* Test for VLA support. This test is partly inspired
|
||||||
from examples in the C standard. Use at least two VLA
|
from examples in the C standard. Use at least two VLA
|
||||||
functions to detect the GCC 3.4.3 bug described in:
|
functions to detect the GCC 3.4.3 bug described in:
|
||||||
https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
|
https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
|
||||||
*/
|
*/
|
||||||
#ifdef __STDC_NO_VLA__
|
#ifdef __STDC_NO_VLA__
|
||||||
syntax error;
|
syntax error;
|
||||||
#else
|
#else
|
||||||
extern int n;
|
extern int n;
|
||||||
int B[100];
|
int B[100];
|
||||||
int fvla (int m, int C[m][m]);
|
int fvla (int m, int C[m][m]);
|
||||||
|
|
||||||
int
|
int
|
||||||
simple (int count, int all[static count])
|
simple (int count, int all[static count])
|
||||||
{
|
{
|
||||||
return all[count - 1];
|
return all[count - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
fvla (int m, int C[m][m])
|
fvla (int m, int C[m][m])
|
||||||
{
|
{
|
||||||
typedef int VLA[m][m];
|
typedef int VLA[m][m];
|
||||||
VLA x;
|
VLA x;
|
||||||
int D[m];
|
int D[m];
|
||||||
static int (*q)[m] = &B;
|
static int (*q)[m] = &B;
|
||||||
int (*s)[n] = q;
|
int (*s)[n] = q;
|
||||||
return C && &x[0][0] == &D[0] && &D[0] == s[0];
|
return C && &x[0][0] == &D[0] && &D[0] == s[0];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
]])],
|
]])],
|
||||||
[ac_cv_c_vararrays=yes],
|
[ac_cv_c_vararrays=yes],
|
||||||
[ac_cv_c_vararrays=no])])])
|
[ac_cv_c_vararrays=no])])])
|
||||||
if test "$ac_cv_c_vararrays" = yes; then
|
if test "$ac_cv_c_vararrays" = yes; then
|
||||||
dnl This is for compatibility with Autoconf 2.61-2.69.
|
dnl This is for compatibility with Autoconf 2.61-2.69.
|
||||||
AC_DEFINE([HAVE_C_VARARRAYS], 1,
|
AC_DEFINE([HAVE_C_VARARRAYS], 1,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue