Update from Gnulib by running admin/merge-gnulib

This commit is contained in:
Paul Eggert 2024-01-20 11:45:04 -08:00
parent d276996c4f
commit 3add626f14
129 changed files with 1062 additions and 676 deletions

View file

@ -4,7 +4,7 @@
# shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2023-07-20'
timestamp='2024-01-01'
# 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
@ -60,7 +60,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2023 Free Software Foundation, Inc.
Copyright 1992-2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
set_cc_for_build
cat <<-EOF > "$dummy.c"
#if defined(__ANDROID__)
LIBC=android
#else
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@ -162,6 +165,8 @@ Linux|GNU|GNU/*)
LIBC=dietlibc
#elif defined(__GLIBC__)
LIBC=gnu
#elif defined(__LLVM_LIBC__)
LIBC=llvm
#else
#include <stdarg.h>
/* First heuristic to detect musl libc. */
@ -169,6 +174,7 @@ Linux|GNU|GNU/*)
LIBC=musl
#endif
#endif
#endif
EOF
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
eval "$cc_set_libc"
@ -904,7 +910,7 @@ EOF
fi
;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
UNAME_PROCESSOR=`uname -p`
case $UNAME_PROCESSOR in
amd64)
UNAME_PROCESSOR=x86_64 ;;
@ -1589,6 +1595,9 @@ EOF
*:Unleashed:*:*)
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
;;
*:Ironclad:*:*)
GUESS=$UNAME_MACHINE-unknown-ironclad
;;
esac
# Do we have a guess based on uname results?

174
build-aux/config.sub vendored
View file

@ -4,7 +4,7 @@
# shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2023-07-31'
timestamp='2024-01-01'
# 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
@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2023 Free Software Foundation, Inc.
Copyright 1992-2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -1181,7 +1181,7 @@ case $cpu-$vendor in
case $cpu in
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| aarch64 | aarch64_be | aarch64c | arm64ec \
| abacus \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
@ -1200,6 +1200,7 @@ case $cpu-$vendor in
| d10v | d30v | dlx | dsp16xx \
| e2k | elxsi | epiphany \
| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
| javascript \
| h8300 | h8500 \
| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
@ -1221,6 +1222,7 @@ case $cpu-$vendor in
| moxie \
| mt \
| msp430 \
| nanomips* \
| nds32 | nds32le | nds32be \
| nfp \
| nios | nios2 | nios2eb | nios2el \
@ -1252,6 +1254,7 @@ case $cpu-$vendor in
| ubicom32 \
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
| vax \
| vc4 \
| visium \
| w65 \
| wasm32 | wasm64 \
@ -1284,11 +1287,12 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
if test x$basic_os != x
if test x"$basic_os" != x
then
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
# set os.
obj=
case $basic_os in
gnu/linux*)
kernel=linux
@ -1488,10 +1492,16 @@ case $os in
os=eabi
;;
*)
os=elf
os=
obj=elf
;;
esac
;;
aout* | coff* | elf* | pe*)
# These are machine code file formats, not OSes
obj=$os
os=
;;
*)
# No normalization, but not necessarily accepted, that comes below.
;;
@ -1510,12 +1520,15 @@ else
# system, and we'll never get to this point.
kernel=
obj=
case $cpu-$vendor in
score-*)
os=elf
os=
obj=elf
;;
spu-*)
os=elf
os=
obj=elf
;;
*-acorn)
os=riscix1.2
@ -1525,28 +1538,35 @@ case $cpu-$vendor in
os=gnu
;;
arm*-semi)
os=aout
os=
obj=aout
;;
c4x-* | tic4x-*)
os=coff
os=
obj=coff
;;
c8051-*)
os=elf
os=
obj=elf
;;
clipper-intergraph)
os=clix
;;
hexagon-*)
os=elf
os=
obj=elf
;;
tic54x-*)
os=coff
os=
obj=coff
;;
tic55x-*)
os=coff
os=
obj=coff
;;
tic6x-*)
os=coff
os=
obj=coff
;;
# This must come before the *-dec entry.
pdp10-*)
@ -1568,19 +1588,24 @@ case $cpu-$vendor in
os=sunos3
;;
m68*-cisco)
os=aout
os=
obj=aout
;;
mep-*)
os=elf
os=
obj=elf
;;
mips*-cisco)
os=elf
os=
obj=elf
;;
mips*-*)
os=elf
mips*-*|nanomips*-*)
os=
obj=elf
;;
or32-*)
os=coff
os=
obj=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=sysv3
@ -1589,7 +1614,8 @@ case $cpu-$vendor in
os=sunos4.1.1
;;
pru-*)
os=elf
os=
obj=elf
;;
*-be)
os=beos
@ -1670,10 +1696,12 @@ case $cpu-$vendor in
os=uxpv
;;
*-rom68k)
os=coff
os=
obj=coff
;;
*-*bug)
os=coff
os=
obj=coff
;;
*-apple)
os=macos
@ -1691,10 +1719,11 @@ esac
fi
# Now, validate our (potentially fixed-up) OS.
# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
case $os in
# Sometimes we do "kernel-libc", so those need to count as OSes.
musl* | newlib* | relibc* | uclibc*)
llvm* | musl* | newlib* | relibc* | uclibc*)
;;
# Likewise for "kernel-abi"
eabi* | gnueabi*)
@ -1702,6 +1731,9 @@ case $os in
# VxWorks passes extra cpu info in the 4th filed.
simlinux | simwindows | spe)
;;
# See `case $cpu-$os` validation below
ghcjs)
;;
# Now accept the basic system types.
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
@ -1719,11 +1751,11 @@ case $os in
| mirbsd* | netbsd* | dicos* | openedition* | ose* \
| bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
| bosx* | nextstep* | cxux* | oabi* \
| ptx* | ecoff* | winnt* | domain* | vsta* \
| udi* | lites* | ieee* | go32* | aux* | hcos* \
| chorusrdb* | cegcc* | glidix* | serenity* \
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
| cygwin* | msys* | moss* | proelf* | rtems* \
| midipix* | mingw32* | mingw64* | mint* \
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
| interix* | uwin* | mks* | rhapsody* | darwin* \
@ -1736,71 +1768,115 @@ case $os in
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
| fiwix* | mlibc* | cos* | mbr* )
| fiwix* | mlibc* | cos* | mbr* | ironclad* )
;;
# This one is extra strict with allowed versions
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
;;
# This refers to builds using the UEFI calling convention
# (which depends on the architecture) and PE file format.
# Note that this is both a different calling convention and
# different file format than that of GNU-EFI
# (x86_64-w64-mingw32).
uefi)
;;
none)
;;
kernel* | msvc* )
# Restricted further below
;;
'')
if test x"$obj" = x
then
echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
fi
;;
*)
echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
exit 1
;;
esac
case $obj in
aout* | coff* | elf* | pe*)
;;
'')
# empty is fine
;;
*)
echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
exit 1
;;
esac
# Here we handle the constraint that a (synthetic) cpu and os are
# valid only in combination with each other and nowhere else.
case $cpu-$os in
# The "javascript-unknown-ghcjs" triple is used by GHC; we
# accept it here in order to tolerate that, but reject any
# variations.
javascript-ghcjs)
;;
javascript-* | *-ghcjs)
echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
exit 1
;;
esac
# As a final step for OS-related things, validate the OS-kernel combination
# (given a valid OS), if there is a kernel.
case $kernel-$os in
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
| linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
case $kernel-$os-$obj in
linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
| linux-mlibc*- | linux-musl*- | linux-newlib*- \
| linux-relibc*- | linux-uclibc*- )
;;
uclinux-uclibc* )
uclinux-uclibc*- )
;;
managarm-mlibc* | managarm-kernel* )
managarm-mlibc*- | managarm-kernel*- )
;;
windows*-gnu* | windows*-msvc*)
windows*-msvc*-)
;;
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
-dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \
| -uclibc*- )
# These are just libc implementations, not actual OSes, and thus
# require a kernel.
echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
exit 1
;;
-kernel* )
-kernel*- )
echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
exit 1
;;
*-kernel* )
*-kernel*- )
echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
exit 1
;;
*-msvc* )
*-msvc*- )
echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
exit 1
;;
kfreebsd*-gnu* | kopensolaris*-gnu*)
kfreebsd*-gnu*- | kopensolaris*-gnu*-)
;;
vxworks-simlinux | vxworks-simwindows | vxworks-spe)
vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
;;
nto-qnx*)
nto-qnx*-)
;;
os2-emx)
os2-emx-)
;;
*-eabi* | *-gnueabi*)
*-eabi*- | *-gnueabi*-)
;;
none-coff* | none-elf*)
none--*)
# None (no kernel, i.e. freestanding / bare metal),
# can be paired with an output format "OS"
# can be paired with an machine code file format
;;
-*)
-*-)
# Blank kernel with real OS is always fine.
;;
*-*)
--*)
# Blank kernel and OS with real machine code file format is always fine.
;;
*-*-*)
echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
exit 1
;;
@ -1884,7 +1960,7 @@ case $vendor in
;;
esac
echo "$cpu-$vendor-${kernel:+$kernel-}$os"
echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
exit
# Local variables:

View file

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2020-11-14.01; # UTC
scriptversion=2023-11-23.18; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -124,9 +124,9 @@ it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
"
Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <https://www.gnu.org/software/automake/>.
General help using GNU software: <https://www.gnu.org/gethelp/>."
while test $# -ne 0; do
case $1 in

View file

@ -138,7 +138,7 @@
eval 'exec perl -wSx -0777 -pi "$0" "$@"'
if 0;
my $VERSION = '2023-06-18.01:14'; # UTC
my $VERSION = '2024-01-15.18:30'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
@ -146,6 +146,7 @@ my $VERSION = '2023-06-18.01:14'; # UTC
use strict;
use warnings;
use re 'eval';
my $copyright_re = 'Copyright';
my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;|©)';
@ -169,14 +170,13 @@ if (!$this_year || $this_year !~ m/^\d{4}$/)
# Unless the file consistently uses "\r\n" as the EOL, use "\n" instead.
my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n";
my $leading;
my $prefix;
my $ws_re;
my $stmt_re;
while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
my $found;
while (/(^|\n)(.{0,$prefix_max})$copyright_re/cg)
{
$leading = "$1$2";
$prefix = $2;
my $pos=pos();
my $leading = "$1$2";
my $prefix = $2;
if ($prefix =~ /^(\s*\/)\*(\s*)$/)
{
$prefix =~ s,/, ,;
@ -187,7 +187,7 @@ while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
$prefix = $prefix_ws;
}
}
$ws_re = '[ \t\r\f]'; # \s without \n
my $ws_re = '[ \t\r\f]'; # \s without \n
$ws_re =
"(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)";
my $holder_re = $holder;
@ -198,96 +198,97 @@ while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
. "((?:\\d\\d)?\\d\\d)$ws_re$holder_re";
if (/\G$stmt_remainder_re/)
{
$found = 1;
$stmt_re =
quotemeta($leading) . "($copyright_re$stmt_remainder_re)";
last;
}
}
if (defined $stmt_re)
{
/$stmt_re/ or die; # Should never die.
my $stmt = $1;
my $final_year_orig = $2;
# Handle two-digit year numbers like "98" and "99".
my $final_year = $final_year_orig;
$final_year <= 99
and $final_year += 1900;
/$stmt_re/ or die; # Should never die.
my $stmt = $1;
my $final_year_orig = $2;
if ($final_year != $this_year)
{
# Update the year.
$stmt =~ s/(^|[^\d])$final_year_orig\b/$1$final_year, $this_year/;
}
if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
{
# Normalize all whitespace including newline-prefix sequences.
$stmt =~ s/$ws_re/ /g;
# Handle two-digit year numbers like "98" and "99".
my $final_year = $final_year_orig;
$final_year <= 99
and $final_year += 1900;
# Put spaces after commas.
$stmt =~ s/, ?/, /g;
# Convert 2-digit to 4-digit years.
$stmt =~ s/(\b\d\d\b)/19$1/g;
# Make the use of intervals consistent.
if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
if ($final_year != $this_year)
{
$stmt =~ s/(\d{4})$ndash_re(\d{4})/join(', ', $1..$2)/eg;
# Update the year.
$stmt =~ s/(^|[^\d])$final_year_orig\b/$1$final_year, $this_year/;
}
else
if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
{
my $ndash = ($ARGV =~ /\.tex(i(nfo)?)?$/ ? "--"
: $ARGV =~ /\.(\d[a-z]*|man)$/ ? "\\(en"
: "-");
# Normalize all whitespace including newline-prefix sequences.
$stmt =~ s/$ws_re/ /g;
$stmt =~
s/
(\d{4})
(?:
(,\ |$ndash_re)
((??{
if ($2 ne ', ') { '\d{4}'; }
elsif (!$3) { $1 + 1; }
else { $3 + 1; }
}))
)+
/$1$ndash$3/gx;
# Put spaces after commas.
$stmt =~ s/, ?/, /g;
# When it's 2, emit a single range encompassing all year numbers.
$ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
and $stmt =~ s/(^|[^\d])(\d{4})\b.*(?:[^\d])(\d{4})\b/$1$2$ndash$3/;
}
# Convert 2-digit to 4-digit years.
$stmt =~ s/(\b\d\d\b)/19$1/g;
# Format within margin.
my $stmt_wrapped;
my $text_margin = $margin - length($prefix);
if ($prefix =~ /^(\t+)/)
{
$text_margin -= length($1) * ($tab_width - 1);
}
while (length $stmt)
{
if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//)
|| ($stmt =~ s/^([\S]+)(?: |$)//))
# Make the use of intervals consistent.
if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
{
my $line = $1;
$stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading;
$stmt_wrapped .= $line;
$stmt =~ s/(\d{4})$ndash_re(\d{4})/join(', ', $1..$2)/eg;
}
else
{
# Should be unreachable, but we don't want an infinite
# loop if it can be reached.
die;
}
}
my $ndash = ($ARGV =~ /\.tex(i(nfo)?)?$/ ? "--"
: $ARGV =~ /\.(\d[a-z]*|man)$/ ? "\\(en"
: "-");
# Replace the old copyright statement.
s/$stmt_re/$stmt_wrapped/g;
$stmt =~
s/
(\d{4})
(?:
(,\ |$ndash_re)
((??{
if ($2 ne ', ') { '\d{4}'; }
elsif (!$3) { $1 + 1; }
else { $3 + 1; }
}))
)+
/$1$ndash$3/gx;
# When it's 2, emit a single range encompassing all year numbers.
$ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
and $stmt =~ s/(^|[^\d])(\d{4})\b.*(?:[^\d])(\d{4})\b/$1$2$ndash$3/;
}
# Format within margin.
my $stmt_wrapped;
my $text_margin = $margin - length($prefix);
if ($prefix =~ /^(\t+)/)
{
$text_margin -= length($1) * ($tab_width - 1);
}
while (length $stmt)
{
if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//)
|| ($stmt =~ s/^([\S]+)(?: |$)//))
{
my $line = $1;
$stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading;
$stmt_wrapped .= $line;
}
else
{
# Should be unreachable, but we don't want an infinite
# loop if it can be reached.
die;
}
}
# Replace the old copyright statement.
my $p = pos();
s/$stmt_re/$stmt_wrapped/g;
pos() = $p;
}
}
}
else
if (!$found)
{
print STDERR "$ARGV: warning: copyright statement not found\n";
}

View file

@ -3,9 +3,9 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2024-01-02.10}
\def\texinfoversion{2023-09-19.19}
%
% Copyright 1985--1986, 1988, 1990--2024 Free Software Foundation, Inc.
% Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@ -5652,42 +5652,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\parfillskip=0pt plus -1fill
%
\advance\rightskip by \entryrightmargin
% Determine how far we can stretch into the margin.
% This allows, e.g., "Appendix H GNU Free Documentation License" to
% fit on one line in @letterpaper format.
\ifdim\entryrightmargin>2.1em
\dimen@i=2.1em
\else
\dimen@i=0em
\fi
\advance \parfillskip by 0pt minus 1\dimen@i
%
\dimen@ii = \hsize
\advance\dimen@ii by -1\leftskip
\advance\dimen@ii by -1\entryrightmargin
\advance\dimen@ii by 1\dimen@i
\ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
\ifdim\dimen@ > 0.8\dimen@ii % due to long index text
% Undo changes above
\advance \parfillskip by 0pt minus -1\dimen@i
\advance\dimen@ii by -1\dimen@i
%
% Try to split the text roughly evenly. \dimen@ will be the length of
% the first line.
\dimen@ = 0.7\dimen@
\dimen@ii = \hsize
\ifnum\dimen@>\dimen@ii
% If the entry is too long (for example, if it needs more than
% two lines), use the same line length for all lines.
\dimen@ = \dimen@ii
\else
\advance \dimen@ by 1\rightskip
\fi
\advance\leftskip by 0pt plus 1fill % ragged right
\parshape = 2 0pt \dimen@ 0em \dimen@ii
% Ideally we'd add a finite glue at the end of the first line only,
% instead of using \parshape with explicit line lengths, but TeX
% doesn't seem to provide a way to do such a thing.
%
% Indent all lines but the first one.
\advance\leftskip by \entrycontskip
@ -5714,12 +5685,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\newskip\thinshrinkable
\skip\thinshrinkable=.15em minus .15em
% Like plain.tex's \dotfill, except uses up at least 1 em.
% Like plain.tex's \dotfill, except uses up at least 0.5 em.
% The filll stretch here overpowers both the fil and fill stretch to push
% the page number to the right.
\def\indexdotfill{\cleaders
\hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll}
\hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 0.5em plus 1filll}
\def\primary #1{\line{#1\hfil}}
@ -7709,9 +7679,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\deflineheader#1 #2 #3\endheader{%
\printdefname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
}
\def\deftypeline{%
\doingtypefntrue
\parseargusing\activeparens{\printdefunline\deflineheader}%
\parseargusing\activeparens{\printdefunline\deftypelineheader}%
}
\def\deftypelineheader#1 #2 #3 #4\endheader{%
\printdefname{#1}{#2}{#3}\magicamp\defunargs{#4\unskip}%
}
% \makedefun{deffoo} (\deffooheader parameters) { (\deffooheader expansion) }
@ -8846,6 +8820,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\fi
}
% @nodedescription, @nodedescriptionblock - do nothing for TeX
\parseargdef\nodedescription{}
\def\nodedescriptionblock{\doignore{nodedescriptionblock}}
% @anchor{NAME} -- define xref target at arbitrary point.
%
\newcount\savesfregister
@ -11859,9 +11838,13 @@ directory should work if nowhere else does.}
\def\c{\loadconf\c}%
% Definition for the first newline read in the file
\def ^^M{\loadconf}%
% In case the first line has a whole-line command on it
% In case the first line has a whole-line or environment command on it
\let\originalparsearg\parsearg%
\def\parsearg{\loadconf\originalparsearg}%
%
% \startenvironment is in the expansion of commands defined with \envdef
\let\originalstartenvironment\startenvironment%
\def\startenvironment{\loadconf\startenvironment}%
}}
@ -11889,6 +11872,7 @@ directory should work if nowhere else does.}
\enableemergencynewline
\let\c=\comment
\let\parsearg\originalparsearg
\let\startenvironment\originalstartenvironment
%
% Also turn back on active characters that might appear in the input
% file name, in case not using a pre-dumped format.

View file

@ -52,9 +52,6 @@ extern int aclsort (int, int, struct acl *);
#include <errno.h>
#include <limits.h>
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)

View file

@ -1,7 +1,7 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2024 Free Software
Foundation, Inc.
Copyright (C) 1995, 1999, 2001-2004, 2006-2024 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -182,6 +182,8 @@
/* The function does not throw exceptions. */
/* Applies to: functions. */
/* After a function's parameter list, this attribute must come first, before
other attributes. */
#define ATTRIBUTE_NOTHROW _GL_ATTRIBUTE_NOTHROW
/* Do not inline the function. */

View file

@ -1,6 +1,5 @@
/* Binary mode I/O.
Copyright (C) 2001, 2003, 2005, 2008-2024 Free Software Foundation,
Inc.
Copyright (C) 2001, 2003, 2005, 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -86,15 +86,21 @@ get_linux_uptime (struct timespec *p_uptime)
static int
get_linux_boot_time_fallback (struct timespec *p_boot_time)
{
/* On Alpine Linux, UTMP_FILE is not filled. It is always empty.
So, get the time stamp of a file that gets touched only during the
boot process. */
/* On Devuan with the 'runit' init system and on Artix with the 's6' init
system, UTMP_FILE contains USER_PROCESS and other entries, but no
BOOT_TIME entry.
On Alpine Linux, UTMP_FILE is not filled. It is always empty.
So, in both cases, get the time stamp of a file that gets touched only
during the boot process. */
const char * const boot_touched_files[] =
{
"/var/lib/systemd/random-seed", /* seen on distros with systemd */
"/var/run/utmp", /* seen on distros with OpenRC */
"/var/lib/random-seed" /* seen on older distros */
"/var/lib/urandom/random-seed", /* seen on Devuan with runit */
"/var/lib/random-seed", /* seen on Artix with s6 */
/* This must come last, since on several distros /var/run/utmp is
modified when a user logs in, i.e. long after boot. */
"/var/run/utmp" /* seen on Alpine Linux with OpenRC */
};
for (idx_t i = 0; i < SIZEOF (boot_touched_files); i++)
{

View file

@ -203,7 +203,14 @@ get_boot_time_uncached (struct timespec *p_boot_time)
}
# endif
# else /* old FreeBSD, OpenBSD, native Windows */
# else /* Adélie Linux, old FreeBSD, OpenBSD, native Windows */
# if defined __linux__ && !defined __ANDROID__
/* Workaround for Adélie Linux: */
get_linux_boot_time_fallback (&found_boot_time);
if (found_boot_time.tv_sec == 0)
get_linux_boot_time_final_fallback (&found_boot_time);
# endif
# if defined __OpenBSD__
/* Workaround for OpenBSD: */

View file

@ -5,8 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
Copyright (C) 2000-2003, 2006, 2008-2024 Free Software Foundation,
Inc.
Copyright (C) 2000-2003, 2006, 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,6 +1,5 @@
/* c-strcasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 1998-1999, 2005-2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,6 +1,5 @@
/* c-strncasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 1998-1999, 2005-2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,7 +1,7 @@
/* Read symbolic links into a buffer without size limitation, relative to fd.
Copyright (C) 2001, 2003-2004, 2007, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 2001, 2003-2004, 2007, 2009-2024 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,7 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 1991, 2004-2006, 2009-2024 Free Software Foundation,
Inc.
Copyright (C) 1991, 2004-2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,7 +1,6 @@
/* Close a stream, with nicer error checking than fclose's.
Copyright (C) 1998-2002, 2004, 2006-2024 Free Software Foundation,
Inc.
Copyright (C) 1998-2002, 2004, 2006-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -1,7 +1,7 @@
/* Analyze differences between two vectors.
Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2024 Free
Software Foundation, Inc.
Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2024 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -237,12 +237,6 @@ _GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - "
_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (dirfd, int, (DIR *));
# ifdef __KLIBC__
/* Gnulib internal hooks needed to maintain the dirfd metadata. */
_GL_EXTERN_C int _gl_register_dirp_fd (int fd, DIR *dirp)
_GL_ARG_NONNULL ((2));
_GL_EXTERN_C void _gl_unregister_dirp_fd (int fd);
# endif
# else
# if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
/* dirfd is defined as a macro and not as a function.

View file

@ -26,59 +26,6 @@
# include "dirent-private.h"
#endif
#ifdef __KLIBC__
# include <stdlib.h>
# include <io.h>
static struct dirp_fd_list
{
DIR *dirp;
int fd;
struct dirp_fd_list *next;
} *dirp_fd_start = NULL;
/* Register fd associated with dirp to dirp_fd_list. */
int
_gl_register_dirp_fd (int fd, DIR *dirp)
{
struct dirp_fd_list *new_dirp_fd = malloc (sizeof *new_dirp_fd);
if (!new_dirp_fd)
return -1;
new_dirp_fd->dirp = dirp;
new_dirp_fd->fd = fd;
new_dirp_fd->next = dirp_fd_start;
dirp_fd_start = new_dirp_fd;
return 0;
}
/* Unregister fd from dirp_fd_list with closing it */
void
_gl_unregister_dirp_fd (int fd)
{
struct dirp_fd_list *dirp_fd;
struct dirp_fd_list *dirp_fd_prev;
for (dirp_fd_prev = NULL, dirp_fd = dirp_fd_start; dirp_fd;
dirp_fd_prev = dirp_fd, dirp_fd = dirp_fd->next)
{
if (dirp_fd->fd == fd)
{
if (dirp_fd_prev)
dirp_fd_prev->next = dirp_fd->next;
else /* dirp_fd == dirp_fd_start */
dirp_fd_start = dirp_fd_start->next;
close (fd);
free (dirp_fd);
break;
}
}
}
#endif
int
dirfd (DIR *dir_p)
{
@ -90,19 +37,7 @@ dirfd (DIR *dir_p)
#else
int fd = DIR_TO_FD (dir_p);
if (fd == -1)
# ifndef __KLIBC__
errno = ENOTSUP;
# else
{
struct dirp_fd_list *dirp_fd;
for (dirp_fd = dirp_fd_start; dirp_fd; dirp_fd = dirp_fd->next)
if (dirp_fd->dirp == dir_p)
return dirp_fd->fd;
errno = EINVAL;
}
# endif
return fd;
#endif

View file

@ -1,7 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
Copyright (C) 1999, 2004-2007, 2009-2024 Free Software Foundation,
Inc.
Copyright (C) 1999, 2004-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -40,10 +40,14 @@ orig_faccessat (int fd, char const *name, int mode, int flag)
}
#endif
#ifdef __osf__
/* Write "unistd.h" here, not <unistd.h>, otherwise OSF/1 5.1 DTK cc
eliminates this include because of the preliminary #include <unistd.h>
above. */
#include "unistd.h"
# include "unistd.h"
#else
# include <unistd.h>
#endif
#ifndef HAVE_ACCESS
/* Mingw lacks access, but it also lacks real vs. effective ids, so

View file

@ -44,42 +44,6 @@ fdopendir (int fd)
return dirp;
}
# elif defined __KLIBC__
# include <InnoTekLIBC/backend.h>
DIR *
fdopendir (int fd)
{
char path[_MAX_PATH];
DIR *dirp;
/* Get a path from fd */
if (__libc_Back_ioFHToPath (fd, path, sizeof (path)))
return NULL;
dirp = opendir (path);
if (!dirp)
return NULL;
/* Unregister fd registered by opendir() */
_gl_unregister_dirp_fd (dirfd (dirp));
/* Register our fd */
if (_gl_register_dirp_fd (fd, dirp))
{
int saved_errno = errno;
closedir (dirp);
errno = saved_errno;
dirp = NULL;
}
return dirp;
}
# else
/* We are not in control of the file descriptor of a DIR, and therefore have to
play tricks with file descriptors before and after a call to opendir(). */

View file

@ -1,7 +1,7 @@
/* Make a string describing file modes.
Copyright (C) 1998-1999, 2003, 2006, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 1998-1999, 2003, 2006, 2009-2024 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/* fpending.c -- return the number of pending output bytes on a stream
Copyright (C) 2000, 2004, 2006-2007, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 2000, 2004, 2006-2007, 2009-2024 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -1,7 +1,7 @@
/* Declare __fpending.
Copyright (C) 2000, 2003, 2005-2006, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 2000, 2003, 2005-2006, 2009-2024 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -1,7 +1,7 @@
/* fsusage.c -- return space usage of mounted file systems
Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2024 Free
Software Foundation, Inc.
Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,7 +1,6 @@
/* provide consistent interface to getgroups for systems that don't allow N==0
Copyright (C) 1996, 1999, 2003, 2006-2024 Free Software Foundation,
Inc.
Copyright (C) 1996, 1999, 2003, 2006-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,7 +1,7 @@
/* Get the system load averages.
Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2024 Free
Software Foundation, Inc.
Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2024 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with gnulib.
Bugs can be reported to bug-gnulib@gnu.org.

View file

@ -57,7 +57,11 @@
#ifndef __THROW
# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4)
# define __THROW throw ()
# if __cplusplus >= 201103L
# define __THROW noexcept (true)
# else
# define __THROW throw ()
# endif
# else
# define __THROW
# endif

View file

@ -21,7 +21,7 @@
# include <config.h>
#endif
#include "getopt.h"
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
@ -223,8 +223,9 @@ process_long_option (int argc, char **argv, const char *optstring,
{
/* Didn't find an exact match, so look for abbreviations. */
unsigned char *ambig_set = NULL;
int ambig_malloced = 0;
int ambig_fallback = 0;
/* Use simpler fallback diagnostic if ambig_set == &ambig_fallback. */
unsigned char ambig_fallback;
void *ambig_malloced = NULL;
int indfound = -1;
for (p = longopts, option_index = 0; p->name; p++, option_index++)
@ -242,39 +243,42 @@ process_long_option (int argc, char **argv, const char *optstring,
|| pfound->val != p->val)
{
/* Second or later nonexact match found. */
if (!ambig_fallback)
if (ambig_set != &ambig_fallback)
{
if (!print_errors)
/* Don't waste effort tracking the ambig set if
we're not going to print it anyway. */
ambig_fallback = 1;
ambig_set = &ambig_fallback;
else if (!ambig_set)
{
if (__libc_use_alloca (n_options))
ambig_set = alloca (n_options);
else if ((ambig_set = malloc (n_options)) == NULL)
/* Fall back to simpler error message. */
ambig_fallback = 1;
else
ambig_malloced = 1;
{
ambig_malloced = malloc (n_options);
/* Fall back to simpler diagnostic if
memory allocation fails. */
ambig_set = (ambig_malloced ? ambig_malloced
: &ambig_fallback);
}
if (ambig_set)
if (ambig_set != &ambig_fallback)
{
memset (ambig_set, 0, n_options);
ambig_set[indfound] = 1;
}
}
if (ambig_set)
if (ambig_set && ambig_set != &ambig_fallback)
ambig_set[option_index] = 1;
}
}
}
if (ambig_set || ambig_fallback)
if (ambig_set)
{
if (print_errors)
{
if (ambig_fallback)
if (ambig_set == &ambig_fallback)
fprintf (stderr, _("%s: option '%s%s' is ambiguous\n"),
argv[0], prefix, d->__nextchar);
else
@ -296,8 +300,7 @@ process_long_option (int argc, char **argv, const char *optstring,
funlockfile (stderr);
}
}
if (ambig_malloced)
free (ambig_set);
free (ambig_malloced);
d->__nextchar += strlen (d->__nextchar);
d->optind++;
d->optopt = 0;

View file

@ -21,7 +21,7 @@
# include <config.h>
#endif
#include "getopt.h"
#include <getopt.h>
#include "getopt_int.h"
int

View file

@ -1,6 +1,6 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2024 Free
Software Foundation, Inc.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,7 +1,6 @@
/* gettime -- get the system clock
Copyright (C) 2002, 2004-2007, 2009-2024 Free Software Foundation,
Inc.
Copyright (C) 2002, 2004-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,7 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
Copyright (C) 2001-2003, 2005-2007, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 2001-2003, 2005-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -34,6 +34,7 @@
# --no-libtool \
# --macro-prefix=gl \
# --no-vc-files \
# --avoid=access \
# --avoid=btowc \
# --avoid=chmod \
# --avoid=close \
@ -563,6 +564,7 @@ GL_GNULIB_PUTS = @GL_GNULIB_PUTS@
GL_GNULIB_PWRITE = @GL_GNULIB_PWRITE@
GL_GNULIB_QSORT_R = @GL_GNULIB_QSORT_R@
GL_GNULIB_RAISE = @GL_GNULIB_RAISE@
GL_GNULIB_RAND = @GL_GNULIB_RAND@
GL_GNULIB_RANDOM = @GL_GNULIB_RANDOM@
GL_GNULIB_RANDOM_R = @GL_GNULIB_RANDOM_R@
GL_GNULIB_RAWMEMCHR = @GL_GNULIB_RAWMEMCHR@
@ -1123,6 +1125,7 @@ REPLACE_EXECVE = @REPLACE_EXECVE@
REPLACE_EXECVP = @REPLACE_EXECVP@
REPLACE_EXECVPE = @REPLACE_EXECVPE@
REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
REPLACE_FCHDIR = @REPLACE_FCHDIR@
REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
@ -1212,6 +1215,7 @@ REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_QSORT_R = @REPLACE_QSORT_R@
REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RAND = @REPLACE_RAND@
REPLACE_RANDOM = @REPLACE_RANDOM@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
@ -1261,6 +1265,7 @@ REPLACE_STRTOUL = @REPLACE_STRTOUL@
REPLACE_STRTOULL = @REPLACE_STRTOULL@
REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_STRVERSCMP = @REPLACE_STRVERSCMP@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
REPLACE_TIME = @REPLACE_TIME@
@ -3326,6 +3331,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_PTSNAME_R''@/$(GL_GNULIB_PTSNAME_R)/g' \
-e 's/@''GNULIB_PUTENV''@/$(GL_GNULIB_PUTENV)/g' \
-e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \
-e 's/@''GNULIB_RAND''@/$(GL_GNULIB_RAND)/g' \
-e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \
-e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \
-e 's/@''GNULIB_REALLOC_GNU''@/$(GL_GNULIB_REALLOC_GNU)/g' \
@ -3423,6 +3429,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
-e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
-e 's|@''REPLACE_RAND''@|$(REPLACE_RAND)|g' \
-e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \
-e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
-e 's|@''REPLACE_REALLOC_FOR_REALLOC_GNU''@|$(REPLACE_REALLOC_FOR_REALLOC_GNU)|g' \
@ -3568,6 +3575,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRVERSCMP''@|$(REPLACE_STRVERSCMP)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
@ -4141,6 +4149,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_EXECVP''@|$(REPLACE_EXECVP)|g' \
-e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
-e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
-e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
-e 's|@''REPLACE_FDATASYNC''@|$(REPLACE_FDATASYNC)|g' \
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \

View file

@ -1,7 +1,7 @@
/* group-member.c -- determine whether group id is in calling user's group list
Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2024 Free
Software Foundation, Inc.
Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -20,6 +20,11 @@
#include <limits.h>
/* Pacify GCC 13.2 in some calls to _GL_EXPR_SIGNED. */
#if defined __GNUC__ && 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
# pragma GCC diagnostic ignored "-Wtype-limits"
#endif
/* Return a value with the common real type of E and V and the value of V.
Do not evaluate E. */
#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))

View file

@ -1,7 +1,6 @@
/* malloc() function that is glibc compatible.
Copyright (C) 1997-1998, 2006-2007, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 1997-1998, 2006-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,7 +1,7 @@
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2024 Free
Software Foundation, Inc.
Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2024 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify

View file

@ -1,7 +1,7 @@
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2024 Free
Software Foundation, Inc.
Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2024 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify

View file

@ -1,7 +1,7 @@
/* Declaration of functions and data types used for MD5 sum computing
library functions.
Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2024 Free
Software Foundation, Inc.
Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2024 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify
@ -32,7 +32,21 @@
# ifndef OPENSSL_API_COMPAT
# define OPENSSL_API_COMPAT 0x10101000L /* FIXME: Use OpenSSL 1.1+ API. */
# endif
# include <openssl/md5.h>
/* If <openssl/macros.h> would give a compile-time error, don't use OpenSSL. */
# include <openssl/opensslv.h>
# if OPENSSL_VERSION_MAJOR >= 3
# include <openssl/configuration.h>
# if (OPENSSL_CONFIGURED_API \
< (OPENSSL_API_COMPAT < 0x900000L ? OPENSSL_API_COMPAT : \
((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
+ ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
+ ((OPENSSL_API_COMPAT >> 12) & 0xFF)))
# undef HAVE_OPENSSL_MD5
# endif
# endif
# if HAVE_OPENSSL_MD5
# include <openssl/md5.h>
# endif
# endif
#define MD5_DIGEST_SIZE 16
@ -49,7 +63,11 @@
#ifndef __THROW
# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4)
# define __THROW throw ()
# if __cplusplus >= 201103L
# define __THROW noexcept (true)
# else
# define __THROW throw ()
# endif
# else
# define __THROW
# endif

View file

@ -1,5 +1,5 @@
/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2024 Free
Software Foundation, Inc.
/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2024 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify

View file

@ -1,7 +1,7 @@
/* memrchr -- find the last occurrence of a byte in a memory block
Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2024 Free
Software Foundation, Inc.
Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2024 Free Software
Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
with help from Dan Sahlin (dan@sics.se) and

View file

@ -1,7 +1,6 @@
/* Provide a replacement for the POSIX nanosleep function.
Copyright (C) 1999-2000, 2002, 2004-2024 Free Software Foundation,
Inc.
Copyright (C) 1999-2000, 2002, 2004-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -38,9 +38,13 @@ orig_open (const char *filename, int flags, mode_t mode)
}
/* Specification. */
#ifdef __osf__
/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates
this include because of the preliminary #include <fcntl.h> above. */
#include "fcntl.h"
# include "fcntl.h"
#else
# include <fcntl.h>
#endif
#include "cloexec.h"

View file

@ -19,7 +19,7 @@
/* Specification. */
#include <string.h>
/* A function definition is only needed if HAVE_RAWMEMCHR is not defined. */
/* A function definition is needed only if HAVE_RAWMEMCHR is not defined. */
#if !HAVE_RAWMEMCHR
# include <limits.h>
@ -30,19 +30,30 @@
void *
rawmemchr (const void *s, int c_in)
{
/* Change this typedef to experiment with performance. */
# ifdef __CHERI_PURE_CAPABILITY__
/* Most architectures let you read an aligned word,
even if the unsigned char array at S ends in the middle of the word.
However CHERI does not, so call memchr
with the underlying object's remaining length.
This cannot return NULL if S points to a C_IN-terminated array.
Use builtins rather than including <cheri.h> which is less stable. */
return memchr (s, c_in, (__builtin_cheri_length_get (s)
- __builtin_cheri_offset_get (s)));
# else
/* You can change this typedef to experiment with performance. */
typedef uintptr_t longword;
/* If you change the "uintptr_t", you should change UINTPTR_WIDTH to match.
This verifies that the type does not have padding bits. */
static_assert (UINTPTR_WIDTH == UCHAR_WIDTH * sizeof (longword));
/* Verify that the longword type lacks padding bits. */
static_assert (UINTPTR_WIDTH == UCHAR_WIDTH * sizeof (uintptr_t));
const unsigned char *char_ptr;
unsigned char c = c_in;
/* Handle the first few bytes by reading one byte at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */
Do this until CHAR_PTR is aligned on a natural longword boundary,
as using alignof (longword) might be slower. */
for (char_ptr = (const unsigned char *) s;
(uintptr_t) char_ptr % alignof (longword) != 0;
(uintptr_t) char_ptr % sizeof (longword) != 0;
++char_ptr)
if (*char_ptr == c)
return (void *) char_ptr;
@ -118,6 +129,7 @@ rawmemchr (const void *s, int c_in)
while (*char_ptr != c)
char_ptr++;
return (void *) char_ptr;
# endif
}
#endif

View file

@ -26,10 +26,6 @@
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
# pragma GCC diagnostic ignored "-Wvla"
# endif
# if __GNUC_PREREQ (4, 3)
# pragma GCC diagnostic ignored "-Wold-style-definition"
# pragma GCC diagnostic ignored "-Wtype-limits"
# endif
#endif
/* Make sure no one compiles this code with a C++ compiler. */

View file

@ -1,7 +1,7 @@
/* Save and restore current working directory.
Copyright (C) 1995, 1997-1998, 2003, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 1995, 1997-1998, 2003, 2009-2024 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -22,6 +22,7 @@
#include "acl.h"
#include "acl-internal.h"
#include "minmax.h"
#if USE_ACL
# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */

View file

@ -1,8 +1,7 @@
/* sha1.c - Functions to compute SHA1 message digest of files or
memory blocks according to the NIST specification FIPS-180-1.
Copyright (C) 2000-2001, 2003-2006, 2008-2024 Free Software
Foundation, Inc.
Copyright (C) 2000-2001, 2003-2006, 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -31,7 +31,21 @@
# ifndef OPENSSL_API_COMPAT
# define OPENSSL_API_COMPAT 0x10101000L /* FIXME: Use OpenSSL 1.1+ API. */
# endif
# include <openssl/sha.h>
/* If <openssl/macros.h> would give a compile-time error, don't use OpenSSL. */
# include <openssl/opensslv.h>
# if OPENSSL_VERSION_MAJOR >= 3
# include <openssl/configuration.h>
# if (OPENSSL_CONFIGURED_API \
< (OPENSSL_API_COMPAT < 0x900000L ? OPENSSL_API_COMPAT : \
((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
+ ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
+ ((OPENSSL_API_COMPAT >> 12) & 0xFF)))
# undef HAVE_OPENSSL_SHA1
# endif
# endif
# if HAVE_OPENSSL_SHA1
# include <openssl/sha.h>
# endif
# endif
# ifdef __cplusplus

View file

@ -30,7 +30,21 @@
# ifndef OPENSSL_API_COMPAT
# define OPENSSL_API_COMPAT 0x10101000L /* FIXME: Use OpenSSL 1.1+ API. */
# endif
# include <openssl/sha.h>
/* If <openssl/macros.h> would give a compile-time error, don't use OpenSSL. */
# include <openssl/opensslv.h>
# if OPENSSL_VERSION_MAJOR >= 3
# include <openssl/configuration.h>
# if (OPENSSL_CONFIGURED_API \
< (OPENSSL_API_COMPAT < 0x900000L ? OPENSSL_API_COMPAT : \
((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
+ ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
+ ((OPENSSL_API_COMPAT >> 12) & 0xFF)))
# undef HAVE_OPENSSL_SHA256
# endif
# endif
# if HAVE_OPENSSL_SHA256
# include <openssl/sha.h>
# endif
# endif
# ifdef __cplusplus

View file

@ -30,7 +30,21 @@
# ifndef OPENSSL_API_COMPAT
# define OPENSSL_API_COMPAT 0x10101000L /* FIXME: Use OpenSSL 1.1+ API. */
# endif
# include <openssl/sha.h>
/* If <openssl/macros.h> would give a compile-time error, don't use OpenSSL. */
# include <openssl/opensslv.h>
# if OPENSSL_VERSION_MAJOR >= 3
# include <openssl/configuration.h>
# if (OPENSSL_CONFIGURED_API \
< (OPENSSL_API_COMPAT < 0x900000L ? OPENSSL_API_COMPAT : \
((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
+ ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
+ ((OPENSSL_API_COMPAT >> 12) & 0xFF)))
# undef HAVE_OPENSSL_SHA512
# endif
# endif
# if HAVE_OPENSSL_SHA512
# include <openssl/sha.h>
# endif
# endif
# ifdef __cplusplus

View file

@ -1,7 +1,6 @@
/* sig2str.c -- convert between signal names and numbers
Copyright (C) 2002, 2004, 2006, 2009-2024 Free Software Foundation,
Inc.
Copyright (C) 2002, 2004, 2006, 2009-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -52,11 +52,13 @@ extern "C" {
#if _GL_WINDOWS_STAT_TIMESPEC || defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
# if _GL_WINDOWS_STAT_TIMESPEC || defined TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim)
# define STAT_TIMESPEC_OFFSETOF(st_xtim) offsetof (struct stat, st_xtim)
# else
# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec)
# endif
#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec)
# define STAT_TIMESPEC_OFFSETOF(st_xtim) offsetof (struct stat, st_xtim##espec)
#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC
# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec)
#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
@ -194,20 +196,21 @@ get_stat_birthtime (_GL_UNUSED struct stat const *st)
}
/* If a stat-like function returned RESULT, normalize the timestamps
in *ST, in case this platform suffers from the Solaris 11 bug where
in *ST, if this platform suffers from a macOS and Solaris bug where
tv_nsec might be negative. Return the adjusted RESULT, setting
errno to EOVERFLOW if normalization overflowed. This function
is intended to be private to this .h file. */
_GL_STAT_TIME_INLINE int
stat_time_normalize (int result, _GL_UNUSED struct stat *st)
{
#if defined __sun && defined STAT_TIMESPEC
#if (((defined __APPLE__ && defined __MACH__) || defined __sun) \
&& defined STAT_TIMESPEC_OFFSETOF)
if (result == 0)
{
long int timespec_hz = 1000000000;
short int const ts_off[] = { offsetof (struct stat, st_atim),
offsetof (struct stat, st_mtim),
offsetof (struct stat, st_ctim) };
short int const ts_off[] = { STAT_TIMESPEC_OFFSETOF (st_atim),
STAT_TIMESPEC_OFFSETOF (st_mtim),
STAT_TIMESPEC_OFFSETOF (st_ctim) };
int i;
for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++)
{

View file

@ -58,7 +58,7 @@
/* On AIX 7.2, with xlc in 64-bit mode, <stddef.h> defines max_align_t to a
type with alignment 4, but 'long' has alignment 8. */
# if defined _AIX && defined __LP64__
# if defined _AIX && defined __LP64__ && !@HAVE_MAX_ALIGN_T@
# if !GNULIB_defined_max_align_t
# ifdef _MAX_ALIGN_T
/* /usr/include/stddef.h has already defined max_align_t. Override it. */
@ -101,11 +101,33 @@ typedef long max_align_t;
# ifndef _@GUARD_PREFIX@_STDDEF_H
# define _@GUARD_PREFIX@_STDDEF_H
/* This file uses _Noreturn. */
/* This file uses _Noreturn, _GL_ATTRIBUTE_NOTHROW. */
#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
*/
#ifndef _GL_ATTRIBUTE_NOTHROW
# if defined __cplusplus
# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4
# if __cplusplus >= 201103L
# define _GL_ATTRIBUTE_NOTHROW noexcept (true)
# else
# define _GL_ATTRIBUTE_NOTHROW throw ()
# endif
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# else
# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__
# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# endif
#endif
/* Some platforms lack wchar_t. */
#if !@HAVE_WCHAR_T@
# define wchar_t int
@ -178,7 +200,7 @@ extern
_Noreturn
void abort (void)
# if defined __cplusplus && (__GLIBC__ >= 2)
throw ()
_GL_ATTRIBUTE_NOTHROW
# endif
;
# define unreachable() abort ()

View file

@ -306,6 +306,8 @@ typedef gl_uint_fast32_t gl_uint_fast16_t;
uintptr_t to avoid conflicting declarations of system functions like
_findclose in <io.h>. */
# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \
|| (defined __INTPTR_WIDTH__ \
&& __INTPTR_WIDTH__ != (defined _WIN64 ? LLONG_WIDTH : LONG_WIDTH)) \
|| defined __MINGW32__)
# undef intptr_t
# undef uintptr_t

View file

@ -38,8 +38,14 @@
/* Suppress macOS deprecation warnings for sprintf and vsprintf. */
#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200809L
# define _GL_DEFINED__POSIX_C_SOURCE
# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
# include <AvailabilityMacros.h>
# endif
# if (defined MAC_OS_X_VERSION_MIN_REQUIRED \
&& 130000 <= MAC_OS_X_VERSION_MIN_REQUIRED)
# define _POSIX_C_SOURCE 200809L
# define _GL_DEFINED__POSIX_C_SOURCE
# endif
#endif
#define _GL_ALREADY_INCLUDING_STDIO_H
@ -58,7 +64,8 @@
#define _@GUARD_PREFIX@_STDIO_H
/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT,
_GL_ATTRIBUTE_MALLOC, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
_GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK,
HAVE_RAW_DECL_*. */
#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
@ -143,6 +150,28 @@
# endif
#endif
/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
*/
#ifndef _GL_ATTRIBUTE_NOTHROW
# if defined __cplusplus
# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4
# if __cplusplus >= 201103L
# define _GL_ATTRIBUTE_NOTHROW noexcept (true)
# else
# define _GL_ATTRIBUTE_NOTHROW throw ()
# endif
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# else
# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__
# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# endif
#endif
/* An __attribute__ __format__ specifier for a function that takes a format
string and arguments, where the format string directives are the ones
standardized by ISO C99 and POSIX.
@ -344,10 +373,18 @@ _GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode));
# else
# if __GNUC__ >= 11
/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
_GL_FUNCDECL_SYS (fdopen, FILE *,
(int fd, const char *mode)
_GL_ATTRIBUTE_NOTHROW
_GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
_GL_ATTRIBUTE_MALLOC);
# else
_GL_FUNCDECL_SYS (fdopen, FILE *,
(int fd, const char *mode)
_GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
_GL_ATTRIBUTE_MALLOC);
# endif
# endif
_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
# endif
@ -355,10 +392,18 @@ _GL_CXXALIASWARN (fdopen);
#else
# if @GNULIB_FCLOSE@ && __GNUC__ >= 11 && !defined fdopen
/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
_GL_FUNCDECL_SYS (fdopen, FILE *,
(int fd, const char *mode)
_GL_ATTRIBUTE_NOTHROW
_GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
_GL_ATTRIBUTE_MALLOC);
# else
_GL_FUNCDECL_SYS (fdopen, FILE *,
(int fd, const char *mode)
_GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
_GL_ATTRIBUTE_MALLOC);
# endif
# endif
# if defined GNULIB_POSIXCHECK
# undef fdopen

View file

@ -1,7 +1,6 @@
/* A GNU-like <stdlib.h>.
Copyright (C) 1995, 2001-2004, 2006-2024 Free Software Foundation,
Inc.
Copyright (C) 1995, 2001-2004, 2006-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@ -39,7 +38,8 @@
#define _@GUARD_PREFIX@_STDLIB_H
/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
_GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
_GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK,
HAVE_RAW_DECL_*. */
#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
@ -133,6 +133,28 @@ struct random_data
# endif
#endif
/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
*/
#ifndef _GL_ATTRIBUTE_NOTHROW
# if defined __cplusplus
# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4
# if __cplusplus >= 201103L
# define _GL_ATTRIBUTE_NOTHROW noexcept (true)
# else
# define _GL_ATTRIBUTE_NOTHROW throw ()
# endif
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# else
# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__
# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# endif
#endif
/* The __attribute__ feature is available in gcc versions 2.5 and later.
The attribute __pure__ was added in gcc 2.96. */
#ifndef _GL_ATTRIBUTE_PURE
@ -201,7 +223,7 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
# define free rpl_free
# endif
# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
_GL_FUNCDECL_RPL (free, void, (void *ptr) throw ());
_GL_FUNCDECL_RPL (free, void, (void *ptr) _GL_ATTRIBUTE_NOTHROW);
# else
_GL_FUNCDECL_RPL (free, void, (void *ptr));
# endif
@ -235,9 +257,16 @@ _GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
# if @HAVE_ALIGNED_ALLOC@
# if __GNUC__ >= 11
/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2
_GL_FUNCDECL_SYS (aligned_alloc, void *,
(size_t alignment, size_t size)
_GL_ATTRIBUTE_NOTHROW
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (aligned_alloc, void *,
(size_t alignment, size_t size)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size));
# endif
@ -248,9 +277,16 @@ _GL_CXXALIASWARN (aligned_alloc);
#else
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined aligned_alloc
/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2
_GL_FUNCDECL_SYS (aligned_alloc, void *,
(size_t alignment, size_t size)
_GL_ATTRIBUTE_NOTHROW
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (aligned_alloc, void *,
(size_t alignment, size_t size)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
# if defined GNULIB_POSIXCHECK
# undef aligned_alloc
@ -293,9 +329,16 @@ _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
# else
# if __GNUC__ >= 11
/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2
_GL_FUNCDECL_SYS (calloc, void *,
(size_t nmemb, size_t size)
_GL_ATTRIBUTE_NOTHROW
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (calloc, void *,
(size_t nmemb, size_t size)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
# endif
@ -305,9 +348,16 @@ _GL_CXXALIASWARN (calloc);
#else
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined calloc
/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2
_GL_FUNCDECL_SYS (calloc, void *,
(size_t nmemb, size_t size)
_GL_ATTRIBUTE_NOTHROW
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (calloc, void *,
(size_t nmemb, size_t size)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
# if defined GNULIB_POSIXCHECK
# undef calloc
@ -329,10 +379,18 @@ _GL_FUNCDECL_RPL (canonicalize_file_name, char *,
_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
# else
# if !@HAVE_CANONICALIZE_FILE_NAME@ || __GNUC__ >= 11
# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
_GL_FUNCDECL_SYS (canonicalize_file_name, char *,
(const char *name)
_GL_ATTRIBUTE_NOTHROW
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (canonicalize_file_name, char *,
(const char *name)
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
# endif
@ -345,10 +403,18 @@ _GL_CXXALIASWARN (canonicalize_file_name);
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined canonicalize_file_name
/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or
rpl_free. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
_GL_FUNCDECL_SYS (canonicalize_file_name, char *,
(const char *name)
_GL_ATTRIBUTE_NOTHROW
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (canonicalize_file_name, char *,
(const char *name)
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
# if defined GNULIB_POSIXCHECK
# undef canonicalize_file_name
@ -570,9 +636,16 @@ _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
# else
# if __GNUC__ >= 11
/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2
_GL_FUNCDECL_SYS (malloc, void *,
(size_t size)
_GL_ATTRIBUTE_NOTHROW
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (malloc, void *,
(size_t size)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
# endif
@ -582,9 +655,16 @@ _GL_CXXALIASWARN (malloc);
#else
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined malloc
/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2
_GL_FUNCDECL_SYS (malloc, void *,
(size_t size)
_GL_ATTRIBUTE_NOTHROW
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (malloc, void *,
(size_t size)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
# undef malloc
@ -967,6 +1047,10 @@ _GL_CXXALIAS_RPL (putenv, int, (char *string));
# define putenv _putenv
# endif
_GL_CXXALIAS_MDA (putenv, int, (char *string));
# elif defined __KLIBC__
/* Need to cast, because on OS/2 kLIBC, the first parameter is
const char *string. */
_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string));
# else
_GL_CXXALIAS_SYS (putenv, int, (char *string));
# endif
@ -983,6 +1067,10 @@ _GL_CXXALIASWARN (putenv);
/* Need to cast, because on mingw, the parameter is either
'const char *string' or 'char *string'. */
_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string));
# elif defined __KLIBC__
/* Need to cast, because on OS/2 kLIBC, the first parameter is
const char *string. */
_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string));
# else
_GL_CXXALIAS_SYS (putenv, int, (char *string));
# endif
@ -1024,7 +1112,9 @@ _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
_gl_qsort_r_compar_fn compare,
void *arg));
# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (qsort_r);
# endif
#elif defined GNULIB_POSIXCHECK
# undef qsort_r
# if HAVE_RAW_DECL_QSORT_R
@ -1034,11 +1124,26 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
#endif
#if @GNULIB_RANDOM_R@
# if !@HAVE_RANDOM_R@
# ifndef RAND_MAX
# define RAND_MAX 2147483647
#if @GNULIB_RAND@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@)
# ifndef RAND_MAX
# define RAND_MAX 2147483647
# endif
#endif
#if @GNULIB_RAND@
# if @REPLACE_RAND@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef rand
# define rand rpl_rand
# endif
_GL_FUNCDECL_RPL (rand, int, (void));
_GL_CXXALIAS_RPL (rand, int, (void));
# else
_GL_CXXALIAS_SYS (rand, int, (void));
# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (rand);
# endif
#endif
@ -1293,8 +1398,16 @@ _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
# else
# if __GNUC__ >= 11
/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */
_GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size)
_GL_ATTRIBUTE_DEALLOC_FREE);
# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2
_GL_FUNCDECL_SYS (realloc, void *,
(void *ptr, size_t size)
_GL_ATTRIBUTE_NOTHROW
_GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (realloc, void *,
(void *ptr, size_t size)
_GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
# endif
@ -1304,8 +1417,16 @@ _GL_CXXALIASWARN (realloc);
#else
# if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined realloc
/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */
_GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size)
_GL_ATTRIBUTE_DEALLOC_FREE);
# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2
_GL_FUNCDECL_SYS (realloc, void *,
(void *ptr, size_t size)
_GL_ATTRIBUTE_NOTHROW
_GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (realloc, void *,
(void *ptr, size_t size)
_GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
# undef realloc

View file

@ -45,7 +45,8 @@
#define _@GUARD_PREFIX@_STRING_H
/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
_GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
_GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK,
HAVE_RAW_DECL_*. */
#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
@ -110,6 +111,28 @@
# endif
#endif
/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
*/
#ifndef _GL_ATTRIBUTE_NOTHROW
# if defined __cplusplus
# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4
# if __cplusplus >= 201103L
# define _GL_ATTRIBUTE_NOTHROW noexcept (true)
# else
# define _GL_ATTRIBUTE_NOTHROW throw ()
# endif
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# else
# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__
# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# endif
#endif
/* The __attribute__ feature is available in gcc versions 2.5 and later.
The attribute __pure__ was added in gcc 2.96. */
#ifndef _GL_ATTRIBUTE_PURE
@ -133,7 +156,7 @@
&& !(defined __cplusplus && defined GNULIB_NAMESPACE))
/* We can't do '#define free rpl_free' here. */
# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
_GL_EXTERN_C void rpl_free (void *) throw ();
_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW;
# else
_GL_EXTERN_C void rpl_free (void *);
# endif
@ -148,7 +171,7 @@ _GL_EXTERN_C
void __cdecl free (void *);
# else
# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
_GL_EXTERN_C void free (void *) throw ();
_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW;
# else
_GL_EXTERN_C void free (void *);
# endif
@ -163,7 +186,7 @@ _GL_EXTERN_C
void __cdecl free (void *);
# else
# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
_GL_EXTERN_C void free (void *) throw ();
_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW;
# else
_GL_EXTERN_C void free (void *);
# endif
@ -266,9 +289,12 @@ _GL_CXXALIAS_SYS_CAST2 (memchr,
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
|| defined __clang__)
_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n) throw ());
_GL_CXXALIASWARN1 (memchr, void *,
(void *__s, int __c, size_t __n)
_GL_ATTRIBUTE_NOTHROW);
_GL_CXXALIASWARN1 (memchr, void const *,
(void const *__s, int __c, size_t __n) throw ());
(void const *__s, int __c, size_t __n)
_GL_ATTRIBUTE_NOTHROW);
# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (memchr);
# endif
@ -368,8 +394,12 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr,
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
|| defined __clang__)
_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ());
_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ());
_GL_CXXALIASWARN1 (memrchr, void *,
(void *, int, size_t)
_GL_ATTRIBUTE_NOTHROW);
_GL_CXXALIASWARN1 (memrchr, void const *,
(void const *, int, size_t)
_GL_ATTRIBUTE_NOTHROW);
# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (memrchr);
# endif
@ -416,9 +446,12 @@ _GL_CXXALIAS_SYS_CAST2 (rawmemchr,
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
|| defined __clang__)
_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in) throw ());
_GL_CXXALIASWARN1 (rawmemchr, void *,
(void *__s, int __c_in)
_GL_ATTRIBUTE_NOTHROW);
_GL_CXXALIASWARN1 (rawmemchr, void const *,
(void const *__s, int __c_in) throw ());
(void const *__s, int __c_in)
_GL_ATTRIBUTE_NOTHROW);
# else
_GL_CXXALIASWARN (rawmemchr);
# endif
@ -538,9 +571,12 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul,
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
|| defined __clang__)
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ());
_GL_CXXALIASWARN1 (strchrnul, char *,
(char *__s, int __c_in)
_GL_ATTRIBUTE_NOTHROW);
_GL_CXXALIASWARN1 (strchrnul, char const *,
(char const *__s, int __c_in) throw ());
(char const *__s, int __c_in)
_GL_ATTRIBUTE_NOTHROW);
# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strchrnul);
# endif
@ -576,10 +612,18 @@ _GL_CXXALIAS_MDA (strdup, char *, (char const *__s));
# undef strdup
# endif
# if (!@HAVE_DECL_STRDUP@ || __GNUC__ >= 11) && !defined strdup
# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
_GL_FUNCDECL_SYS (strdup, char *,
(char const *__s)
_GL_ATTRIBUTE_NOTHROW
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (strdup, char *,
(char const *__s)
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
_GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
# endif
@ -587,10 +631,18 @@ _GL_CXXALIASWARN (strdup);
#else
# if __GNUC__ >= 11 && !defined strdup
/* For -Wmismatched-dealloc: Associate strdup with free or rpl_free. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
_GL_FUNCDECL_SYS (strdup, char *,
(char const *__s)
_GL_ATTRIBUTE_NOTHROW
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (strdup, char *,
(char const *__s)
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
# if defined GNULIB_POSIXCHECK
# undef strdup
@ -659,10 +711,18 @@ _GL_FUNCDECL_RPL (strndup, char *,
_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
# else
# if !@HAVE_DECL_STRNDUP@ || (__GNUC__ >= 11 && !defined strndup)
# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
_GL_FUNCDECL_SYS (strndup, char *,
(char const *__s, size_t __n)
_GL_ATTRIBUTE_NOTHROW
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (strndup, char *,
(char const *__s, size_t __n)
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
# endif
@ -670,10 +730,18 @@ _GL_CXXALIASWARN (strndup);
#else
# if __GNUC__ >= 11 && !defined strndup
/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */
# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
_GL_FUNCDECL_SYS (strndup, char *,
(char const *__s, size_t __n)
_GL_ATTRIBUTE_NOTHROW
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# else
_GL_FUNCDECL_SYS (strndup, char *,
(char const *__s, size_t __n)
_GL_ARG_NONNULL ((1))
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
# endif
# endif
# if defined GNULIB_POSIXCHECK
# undef strndup
@ -742,9 +810,12 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk,
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
|| defined __clang__)
_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept) throw ());
_GL_CXXALIASWARN1 (strpbrk, char *,
(char *__s, char const *__accept)
_GL_ATTRIBUTE_NOTHROW);
_GL_CXXALIASWARN1 (strpbrk, char const *,
(char const *__s, char const *__accept) throw ());
(char const *__s, char const *__accept)
_GL_ATTRIBUTE_NOTHROW);
# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strpbrk);
# endif
@ -852,9 +923,11 @@ _GL_CXXALIAS_SYS_CAST2 (strstr,
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
|| defined __clang__)
_GL_CXXALIASWARN1 (strstr, char *,
(char *haystack, const char *needle) throw ());
(char *haystack, const char *needle)
_GL_ATTRIBUTE_NOTHROW);
_GL_CXXALIASWARN1 (strstr, const char *,
(const char *haystack, const char *needle) throw ());
(const char *haystack, const char *needle)
_GL_ATTRIBUTE_NOTHROW);
# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strstr);
# endif
@ -903,9 +976,11 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr,
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
|| defined __clang__)
_GL_CXXALIASWARN1 (strcasestr, char *,
(char *haystack, const char *needle) throw ());
(char *haystack, const char *needle)
_GL_ATTRIBUTE_NOTHROW);
_GL_CXXALIASWARN1 (strcasestr, const char *,
(const char *haystack, const char *needle) throw ());
(const char *haystack, const char *needle)
_GL_ATTRIBUTE_NOTHROW);
# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strcasestr);
# endif
@ -1344,12 +1419,22 @@ _GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
#endif
#if @GNULIB_STRVERSCMP@
# if !@HAVE_STRVERSCMP@
# if @REPLACE_STRVERSCMP@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define strverscmp rpl_strverscmp
# endif
_GL_FUNCDECL_RPL (strverscmp, int, (const char *, const char *)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (strverscmp, int, (const char *, const char *));
# else
# if !@HAVE_STRVERSCMP@
_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
# endif
# endif
_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
# endif
_GL_CXXALIASWARN (strverscmp);
#elif defined GNULIB_POSIXCHECK
# undef strverscmp

View file

@ -1,7 +1,7 @@
/* Convert string representation of a number into an intmax_t value.
Copyright (C) 1999, 2001-2004, 2006, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 1999, 2001-2004, 2006, 2009-2024 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -1,7 +1,7 @@
/* Convert string representation of a number into an integer value.
Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2024 Free
Software Foundation, Inc.
Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2024 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@gnu.org.

View file

@ -1,6 +1,6 @@
/* Function to parse a 'long long int' from text.
Copyright (C) 1995-1997, 1999, 2001, 2009-2024 Free Software
Foundation, Inc.
Copyright (C) 1995-1997, 1999, 2001, 2009-2024 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify

View file

@ -55,17 +55,41 @@
#ifndef _@GUARD_PREFIX@_SYS_STAT_H
#define _@GUARD_PREFIX@_SYS_STAT_H
/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
/* This file uses _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
*/
#ifndef _GL_ATTRIBUTE_NOTHROW
# if defined __cplusplus
# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4
# if __cplusplus >= 201103L
# define _GL_ATTRIBUTE_NOTHROW noexcept (true)
# else
# define _GL_ATTRIBUTE_NOTHROW throw ()
# endif
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# else
# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__
# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# endif
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Before doing "#define mknod rpl_mknod" below, we need to include all
headers that may declare mknod(). OS/2 kLIBC declares mknod() in
<unistd.h>, not in <sys/stat.h>. */
@ -575,7 +599,11 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - "
#if @GNULIB_GETUMASK@
# if !@HAVE_GETUMASK@
# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2
_GL_FUNCDECL_SYS (getumask, mode_t, (void) _GL_ATTRIBUTE_NOTHROW);
# else
_GL_FUNCDECL_SYS (getumask, mode_t, (void));
# endif
# endif
_GL_CXXALIAS_SYS (getumask, mode_t, (void));
# if @HAVE_GETUMASK@

View file

@ -193,7 +193,7 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
char *XXXXXX;
unsigned int count;
int fd = -1;
int save_errno = errno;
int saved_errno = errno;
/* A lower bound on the number of temporary files to attempt to
generate. The maximum total number of temporary file names that
@ -258,7 +258,7 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
fd = tryfunc (tmpl, args);
if (fd >= 0)
{
__set_errno (save_errno);
__set_errno (saved_errno);
return fd;
}
else if (errno != EEXIST)

View file

@ -1,7 +1,6 @@
/* Reentrant time functions like localtime_r.
Copyright (C) 2003, 2006-2007, 2010-2024 Free Software Foundation,
Inc.
Copyright (C) 2003, 2006-2007, 2010-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as

View file

@ -18,5 +18,5 @@
#include <config.h>
#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
#include "unistd.h"
#include <unistd.h>
typedef int dummy;

View file

@ -971,23 +971,28 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2008 specification
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */
# if ! @HAVE_FCHDIR@
# if @REPLACE_FCHDIR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef fchdir
# define fchdir rpl_fchdir
# endif
_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/));
_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/));
# else
# if !@HAVE_FCHDIR@ || !@HAVE_DECL_FCHDIR@
_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
# endif
_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
# endif
_GL_CXXALIASWARN (fchdir);
# if @REPLACE_FCHDIR@ || !@HAVE_FCHDIR@
/* Gnulib internal hooks needed to maintain the fchdir metadata. */
_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename)
_GL_ARG_NONNULL ((2));
_GL_EXTERN_C void _gl_unregister_fd (int fd);
_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
_GL_EXTERN_C const char *_gl_directory_name (int fd);
# else
# if !@HAVE_DECL_FCHDIR@
_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
# endif
# endif
_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
_GL_CXXALIASWARN (fchdir);
#elif defined GNULIB_POSIXCHECK
# undef fchdir
# if HAVE_RAW_DECL_FCHDIR
@ -1113,10 +1118,10 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
or SIZE was too small.
See the POSIX:2008 specification
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
Additionally, the gnulib module 'getcwd' guarantees the following GNU
extension: If BUF is NULL, an array is allocated with 'malloc'; the array
is SIZE bytes long, unless SIZE == 0, in which case it is as big as
necessary. */
Additionally, the gnulib module 'getcwd' or 'getcwd-lgpl' guarantees the
following GNU extension: If BUF is NULL, an array is allocated with
'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case
it is as big as necessary. */
# if @REPLACE_GETCWD@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define getcwd rpl_getcwd

View file

@ -101,7 +101,7 @@
# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
# endif
# if HAVE_DECL_GETC_UNLOCKED || defined get_unlocked
# if HAVE_DECL_GETC_UNLOCKED || defined getc_unlocked
# undef getc
# define getc(x) getc_unlocked (x)
# else

View file

@ -231,8 +231,8 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2])
The same bug occurs in Solaris 11.1 (Apr 2013).
FIXME: Simplify this for Linux in 2016 and for Solaris in
2024, when file system bugs are no longer common. */
FIXME: Simplify this in 2024, when these file system bugs are
no longer common on Gnulib target platforms. */
if (adjustment_needed == 2)
{
if (fd < 0 ? stat (file, &st) : fstat (fd, &st))

View file

@ -188,9 +188,9 @@ template <int w>
_gl_verify_type<(R) ? 1 : -1>
#elif defined _GL_HAVE__STATIC_ASSERT
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
struct { \
_Static_assert (R, DIAGNOSTIC); \
int _gl_dummy; \
struct { \
_Static_assert (R, DIAGNOSTIC); \
int _gl_dummy; \
}
#else
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
@ -212,8 +212,8 @@ template <int w>
#elif defined _GL_HAVE__STATIC_ASSERT
# define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
#else
# define _GL_VERIFY(R, DIAGNOSTIC, ...) \
extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
# define _GL_VERIFY(R, DIAGNOSTIC, ...) \
extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
[_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
# pragma GCC diagnostic ignored "-Wnested-externs"

View file

@ -1,7 +1,6 @@
/* xalloc-oversized.h -- memory allocation size checking
Copyright (C) 1990-2000, 2003-2004, 2006-2024 Free Software
Foundation, Inc.
Copyright (C) 1990-2000, 2003-2004, 2006-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@ -49,13 +48,13 @@
#if 7 <= __GNUC__ && !defined __clang__ && PTRDIFF_MAX < SIZE_MAX
# define xalloc_oversized(n, s) \
__builtin_mul_overflow_p (n, s, (ptrdiff_t) 1)
#elif (5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ \
&& PTRDIFF_MAX < SIZE_MAX)
#elif 5 <= __GNUC__ && !defined __ICC && PTRDIFF_MAX < SIZE_MAX
# define xalloc_oversized(n, s) \
(__builtin_constant_p (n) && __builtin_constant_p (s) \
? __xalloc_oversized (n, s) \
: ({ ptrdiff_t __xalloc_count; \
__builtin_mul_overflow (n, s, &__xalloc_count); }))
: __extension__ \
({ ptrdiff_t __xalloc_count; \
__builtin_mul_overflow (n, s, &__xalloc_count); }))
/* Other compilers use integer division; this may be slower but is
more portable. */

View file

@ -1,4 +1,4 @@
# 00gnulib.m4 serial 8
# 00gnulib.m4 serial 9
dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -49,14 +49,14 @@ dnl AC_REQUIRE([gl_COMPILER_CLANG])
[if test $gl_cv_compiler_clang = yes; then
dnl Test whether the compiler supports the option
dnl '-Werror=implicit-function-declaration'.
save_ac_compile="$ac_compile"
saved_ac_compile="$ac_compile"
ac_compile="$ac_compile -Werror=implicit-function-declaration"
dnl Use _AC_COMPILE_IFELSE instead of AC_COMPILE_IFELSE, to avoid a
dnl warning "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'],
[gl_cv_compiler_check_decl_option=none])
ac_compile="$save_ac_compile"
ac_compile="$saved_ac_compile"
else
gl_cv_compiler_check_decl_option=none
fi
@ -71,11 +71,11 @@ dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl
dnl instead of ac_compile. If, for whatever reason, the override of AC_PROG_CC
dnl in zzgnulib.m4 is inactive, use the original ac_compile.
m4_define([_AC_CHECK_DECL_BODY],
[ ac_save_ac_compile="$ac_compile"
[ ac_saved_ac_compile="$ac_compile"
if test -n "$ac_compile_for_check_decl"; then
ac_compile="$ac_compile_for_check_decl"
fi]
m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile"
m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_saved_ac_compile"
])
# gl_00GNULIB

View file

@ -1,4 +1,4 @@
# absolute-header.m4 serial 17
# absolute-header.m4 serial 18
dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -66,7 +66,7 @@ AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
esac
changequote(,)
case "$host_os" in
mingw*)
mingw* | windows*)
dnl For the sake of native Windows compilers (excluding gcc),
dnl treat backslash as a directory separator, like /.
dnl Actually, these compilers use a double-backslash as

View file

@ -1,5 +1,5 @@
# acl.m4 - check for access control list (ACL) primitives
# serial 29
# serial 30
# Copyright (C) 2002, 2004-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_FUNC_ACL],
dnl On all platforms, the ACL related API is declared in <sys/acl.h>.
AC_CHECK_HEADERS([sys/acl.h])
if test $ac_cv_header_sys_acl_h = yes; then
ac_save_LIBS=$LIBS
gl_saved_LIBS=$LIBS
dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, Mac OS X,
dnl IRIX, Tru64, Cygwin >= 2.5).
@ -129,7 +129,7 @@ int type = ACL_TYPE_EXTENDED;]])],
fi
fi
LIBS=$ac_save_LIBS
LIBS=$gl_saved_LIBS
fi
if test "$enable_acl$use_acl" = yes0; then

View file

@ -1,6 +1,6 @@
# alloca.m4 serial 21
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2024 Free Software
dnl Foundation, Inc.
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2024 Free Software Foundation,
dnl 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.

View file

@ -9,10 +9,10 @@ dnl From Paul Eggert.
AC_DEFUN([gl_ASSERT_H],
[
AC_CACHE_CHECK([for static_assert], [gl_cv_static_assert],
[gl_save_CFLAGS=$CFLAGS
[gl_saved_CFLAGS=$CFLAGS
for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
AS_CASE([$gl_working],
[*assert.h*], [CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H"])
[*assert.h*], [CFLAGS="$gl_saved_CFLAGS -DINCLUDE_ASSERT_H"])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
@ -32,7 +32,7 @@ AC_DEFUN([gl_ASSERT_H],
]])],
[gl_cv_static_assert=$gl_working],
[gl_cv_static_assert=no])
CFLAGS=$gl_save_CFLAGS
CFLAGS=$gl_saved_CFLAGS
test "$gl_cv_static_assert" != no && break
done])

View file

@ -1,4 +1,4 @@
# canonicalize.m4 serial 38
# canonicalize.m4 serial 39
dnl Copyright (C) 2003-2007, 2009-2024 Free Software Foundation, Inc.
@ -66,8 +66,8 @@ AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
dnl available through the linker option '-loldnames'.
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
mingw*) ;;
*) AC_CHECK_FUNCS([getcwd]) ;;
mingw* | windows*) ;;
*) AC_CHECK_FUNCS([getcwd]) ;;
esac
AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
@ -158,16 +158,16 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
esac
],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
# Guess 'nearly' on musl systems.
*-musl*) gl_cv_func_realpath_works="guessing nearly" ;;
# Guess no on Cygwin.
cygwin*) gl_cv_func_realpath_works="guessing no" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_realpath_works="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
# Guess 'nearly' on musl systems.
*-musl*) gl_cv_func_realpath_works="guessing nearly" ;;
# Guess no on Cygwin.
cygwin*) gl_cv_func_realpath_works="guessing no" ;;
# Guess no on native Windows.
mingw* | windows*) gl_cv_func_realpath_works="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.a conftest.l conftest.d

View file

@ -1,4 +1,4 @@
# clock_time.m4 serial 13
# clock_time.m4 serial 14
dnl Copyright (C) 2002-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -32,7 +32,7 @@ AC_DEFUN([gl_CLOCK_TIME],
CLOCK_TIME_LIB=
AC_SUBST([CLOCK_TIME_LIB])
case "$host_os" in
mingw*)
mingw* | windows*)
ac_cv_func_clock_getres=no
ac_cv_func_clock_gettime=no
ac_cv_func_clock_settime=no

View file

@ -1,6 +1,6 @@
# codeset.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2024 Free
dnl Software Foundation, Inc.
dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2024 Free Software
dnl 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.

View file

@ -5,8 +5,7 @@ dnl
dnl Check whether struct dirent has a member named d_type.
dnl
# Copyright (C) 1997, 1999-2004, 2006, 2009-2024 Free Software
# Foundation, Inc.
# Copyright (C) 1997, 1999-2004, 2006, 2009-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View file

@ -1,4 +1,4 @@
# dirent_h.m4 serial 20
# dirent_h.m4 serial 22
dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -32,14 +32,13 @@ AC_DEFUN_ONCE([gl_DIRENT_H],
dnl Determine whether <dirent.h> needs to override the DIR type.
AC_DEFUN_ONCE([gl_DIRENT_DIR],
[
dnl Set DIR_HAS_FD_MEMBER if dirfd() works, i.e. not always returns -1,
dnl or has the __KLIBC__ workaround as in lib/dirfd.c.
dnl Set DIR_HAS_FD_MEMBER if dirfd() works, i.e. not always returns -1.
dnl We could use the findings from gl_FUNC_DIRFD and gl_PREREQ_DIRFD, but
dnl it's simpler since we know the affected platforms.
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
mingw*) DIR_HAS_FD_MEMBER=0 ;;
*) DIR_HAS_FD_MEMBER=1 ;;
mingw* | windows* | os2*) DIR_HAS_FD_MEMBER=0 ;;
*) DIR_HAS_FD_MEMBER=1 ;;
esac
AC_SUBST([DIR_HAS_FD_MEMBER])
])

View file

@ -1,4 +1,4 @@
# serial 28 -*- Autoconf -*-
# serial 30 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
@ -40,15 +40,12 @@ AC_DEFUN([gl_FUNC_DIRFD],
HAVE_DIRFD=0
else
HAVE_DIRFD=1
dnl Replace dirfd() on native Windows, to support fdopendir().
dnl Replace dirfd() on native Windows and OS/2 kLIBC,
dnl to support fdopendir().
AC_REQUIRE([gl_DIRENT_DIR])
if test $DIR_HAS_FD_MEMBER = 0; then
REPLACE_DIRFD=1
fi
dnl OS/2 kLIBC dirfd() does not work.
case "$host_os" in
os2*) REPLACE_DIRFD=1 ;;
esac
fi
])
@ -58,7 +55,7 @@ AC_DEFUN([gl_PREREQ_DIRFD],
AC_CACHE_CHECK([how to get the file descriptor associated with an open DIR*],
[gl_cv_sys_dir_fd_member_name],
[
dirfd_save_CFLAGS=$CFLAGS
gl_saved_CFLAGS=$CFLAGS
for ac_expr in d_fd dd_fd; do
CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
@ -68,7 +65,7 @@ AC_DEFUN([gl_PREREQ_DIRFD],
[[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])],
[dir_fd_found=yes]
)
CFLAGS=$dirfd_save_CFLAGS
CFLAGS=$gl_saved_CFLAGS
test "$dir_fd_found" = yes && break
done
test "$dir_fd_found" = yes || ac_expr=no_such_member

View file

@ -1,6 +1,5 @@
#serial 27
dnl Copyright (C) 2002, 2005, 2007, 2009-2024 Free Software Foundation,
dnl Inc.
#serial 28
dnl Copyright (C) 2002, 2005, 2007, 2009-2024 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.
@ -68,7 +67,7 @@ AC_DEFUN([gl_FUNC_DUP2],
],
[gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
[case "$host_os" in
mingw*) # on this platform, dup2 always returns 0 for success
mingw* | windows*) # on this platform, dup2 always returns 0 for success
gl_cv_func_dup2_works="guessing no" ;;
cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
gl_cv_func_dup2_works="guessing no" ;;

View file

@ -1,6 +1,5 @@
# filemode.m4 serial 9
dnl Copyright (C) 2002, 2005-2006, 2009-2024 Free Software Foundation,
dnl Inc.
dnl Copyright (C) 2002, 2005-2006, 2009-2024 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.

View file

@ -1,4 +1,4 @@
# fstatat.m4 serial 4
# fstatat.m4 serial 5
dnl Copyright (C) 2004-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -50,7 +50,7 @@ AC_DEFUN([gl_FUNC_FSTATAT],
esac
case $host_os in
solaris*)
darwin* | solaris*)
REPLACE_FSTATAT=1 ;;
esac

View file

@ -1,8 +1,7 @@
# serial 35
# Obtaining file system usage information.
# Copyright (C) 1997-1998, 2000-2001, 2003-2024 Free Software
# Foundation, Inc.
# Copyright (C) 1997-1998, 2000-2001, 2003-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View file

@ -1,10 +1,9 @@
# serial 24
# serial 25
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
# Copyright (C) 1996-1997, 1999-2004, 2008-2024 Free Software
# Foundation, Inc.
# Copyright (C) 1996-1997, 1999-2004, 2008-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -21,7 +20,7 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
# If we don't yet have getgroups, see if it's in -lbsd.
# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
ac_save_LIBS=$LIBS
gl_saved_LIBS=$LIBS
if test $ac_cv_func_getgroups = no; then
AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd])
fi
@ -57,7 +56,7 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
[Define to 1 if your system has a working `getgroups' function.])
;;
esac
LIBS=$ac_save_LIBS
LIBS=$gl_saved_LIBS
])# AC_FUNC_GETGROUPS
AC_DEFUN([gl_FUNC_GETGROUPS],

View file

@ -1,7 +1,7 @@
# getline.m4 serial 33
dnl Copyright (C) 1998-2003, 2005-2007, 2009-2024 Free Software
dnl Foundation, Inc.
dnl Copyright (C) 1998-2003, 2005-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,

View file

@ -1,13 +1,13 @@
# Check for getloadavg.
# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2024 Free
# Software Foundation, Inc.
# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2024 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 12
#serial 13
# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
# New applications should use gl_GETLOADAVG instead.
@ -20,7 +20,7 @@ AC_DEFUN([gl_GETLOADAVG],
# Persuade glibc <stdlib.h> to declare getloadavg().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
gl_save_LIBS=$LIBS
gl_saved_LIBS=$LIBS
# getloadavg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
@ -81,12 +81,12 @@ if test $ac_cv_func_getloadavg != yes; then
fi
fi
if test "x$gl_save_LIBS" = x; then
if test "x$gl_saved_LIBS" = x; then
GETLOADAVG_LIBS=$LIBS
else
GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_saved_LIBS!!"`
fi
LIBS=$gl_save_LIBS
LIBS=$gl_saved_LIBS
AC_SUBST([GETLOADAVG_LIBS])dnl

View file

@ -1,4 +1,4 @@
# getopt.m4 serial 48
# getopt.m4 serial 49
dnl Copyright (C) 2002-2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -197,8 +197,8 @@ main ()
fi
else
case "$host_os" in
darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
*) gl_cv_func_getopt_posix="guessing yes";;
darwin* | aix* | mingw* | windows*) gl_cv_func_getopt_posix="guessing no";;
*) gl_cv_func_getopt_posix="guessing yes";;
esac
fi
])

View file

@ -1,4 +1,4 @@
# getrandom.m4 serial 11
# getrandom.m4 serial 13
dnl Copyright 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -9,6 +9,8 @@ dnl Written by Paul Eggert.
AC_DEFUN([gl_FUNC_GETRANDOM],
[
AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
gl_CHECK_FUNCS_ANDROID([getrandom],
[[/* Additional includes are needed before <sys/random.h> on uClibc
and Mac OS X. */
@ -45,7 +47,7 @@ AC_DEFUN([gl_FUNC_GETRANDOM],
fi
case "$host_os" in
mingw*)
mingw* | windows*)
AC_CHECK_HEADERS([bcrypt.h], [], [],
[[#include <windows.h>
]])

View file

@ -1,6 +1,5 @@
# gettime.m4 serial 14
dnl Copyright (C) 2002, 2004-2006, 2009-2024 Free Software Foundation,
dnl Inc.
dnl Copyright (C) 2002, 2004-2006, 2009-2024 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.

View file

@ -1,7 +1,6 @@
# serial 29
# serial 30
# Copyright (C) 2001-2003, 2005, 2007, 2009-2024 Free Software
# Foundation, Inc.
# Copyright (C) 2001-2003, 2005, 2007, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -58,7 +57,7 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict);
dnl On mingw, the original gettimeofday has only a precision of 15.6
dnl milliseconds. So override it.
case "$host_os" in
mingw*) REPLACE_GETTIMEOFDAY=1 ;;
mingw* | windows*) REPLACE_GETTIMEOFDAY=1 ;;
esac
fi
AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],

View file

@ -1,4 +1,4 @@
# gnulib-common.m4 serial 87
# gnulib-common.m4 serial 90
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -114,10 +114,14 @@ AC_DEFUN([gl_COMMON_BODY], [
# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
#endif
/* Disable GCC -Wpedantic if using __has_c_attribute and this is not C23+. */
#if (defined __has_c_attribute && _GL_GNUC_PREREQ (4, 6) \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)
# pragma GCC diagnostic ignored "-Wpedantic"
/* Use __has_c_attribute if available. However, do not use with
pre-C23 GCC, which can issue false positives if -Wpedantic. */
#if (defined __has_c_attribute \
&& ! (_GL_GNUC_PREREQ (4, 6) \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710))
# define _GL_HAVE___HAS_C_ATTRIBUTE 1
#else
# define _GL_HAVE___HAS_C_ATTRIBUTE 0
#endif
/* Define if, in a function declaration, the attributes in bracket syntax
@ -242,7 +246,7 @@ AC_DEFUN([gl_COMMON_BODY], [
in C++ also: namespace, class, template specialization. */
#ifndef _GL_ATTRIBUTE_DEPRECATED
# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
# ifdef __has_c_attribute
# if _GL_HAVE___HAS_C_ATTRIBUTE
# if __has_c_attribute (__deprecated__)
# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
# endif
@ -291,7 +295,7 @@ AC_DEFUN([gl_COMMON_BODY], [
/* Applies to: Empty statement (;), inside a 'switch' statement. */
/* Always expands to something. */
#ifndef _GL_ATTRIBUTE_FALLTHROUGH
# ifdef __has_c_attribute
# if _GL_HAVE___HAS_C_ATTRIBUTE
# if __has_c_attribute (__fallthrough__)
# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
# endif
@ -380,7 +384,7 @@ AC_DEFUN([gl_COMMON_BODY], [
# if !defined __apple_build_version__ && __clang_major__ >= 10
# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
# endif
# elif defined __has_c_attribute
# elif _GL_HAVE___HAS_C_ATTRIBUTE
# if __has_c_attribute (__maybe_unused__)
# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
# endif
@ -411,7 +415,7 @@ AC_DEFUN([gl_COMMON_BODY], [
# if __clang_major__ >= 1000
# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
# endif
# elif defined __has_c_attribute
# elif _GL_HAVE___HAS_C_ATTRIBUTE
# if __has_c_attribute (__nodiscard__)
# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
# endif
@ -466,11 +470,25 @@ AC_DEFUN([gl_COMMON_BODY], [
/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
*/
/* Applies to: functions. */
/* After a function's parameter list, this attribute must come first, before
other attributes. */
#ifndef _GL_ATTRIBUTE_NOTHROW
# if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
# if defined __cplusplus
# if _GL_GNUC_PREREQ (2, 8) || __clang_major >= 4
# if __cplusplus >= 201103L
# define _GL_ATTRIBUTE_NOTHROW noexcept (true)
# else
# define _GL_ATTRIBUTE_NOTHROW throw ()
# endif
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# else
# define _GL_ATTRIBUTE_NOTHROW
# if _GL_HAS_ATTRIBUTE (nothrow)
# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
# else
# define _GL_ATTRIBUTE_NOTHROW
# endif
# endif
#endif
@ -1056,6 +1074,7 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
dnl -Wno-pedantic >= 4.8 >= 3.9
dnl -Wno-sign-compare >= 3 >= 3.9
dnl -Wno-sign-conversion >= 4.3 >= 3.9
dnl -Wno-tautological-out-of-range-compare - >= 3.9
dnl -Wno-type-limits >= 4.3 >= 3.9
dnl -Wno-undef >= 3 >= 3.9
dnl -Wno-unsuffixed-float-constants >= 4.5
@ -1081,6 +1100,9 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
#if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wno-pedantic
#endif
#if 3 < __clang_major__ + (9 <= __clang_minor__)
-Wno-tautological-constant-out-of-range-compare
#endif
#if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wno-sign-conversion
-Wno-type-limits
@ -1144,12 +1166,12 @@ AC_DEFUN([gl_PREPARE_CHECK_FUNCS_MACOS],
if test $gl_cv_compiler_clang = yes; then
dnl Test whether the compiler supports the option
dnl '-Werror=unguarded-availability-new'.
save_ac_compile="$ac_compile"
saved_ac_compile="$ac_compile"
ac_compile="$ac_compile -Werror=unguarded-availability-new"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[gl_cv_compiler_check_future_option='-Werror=unguarded-availability-new'],
[gl_cv_compiler_check_future_option=none])
ac_compile="$save_ac_compile"
ac_compile="$saved_ac_compile"
else
gl_cv_compiler_check_future_option=none
fi
@ -1197,14 +1219,14 @@ AC_DEFUN([gl_CHECK_FUNCS_CASE_FOR_MACOS],
darwin*)
if test "x$gl_cv_compiler_check_future_option" != "xnone"; then
dnl Use a compile test, not a link test.
save_ac_compile="$ac_compile"
saved_ac_compile="$ac_compile"
ac_compile="$ac_compile $gl_cv_compiler_check_future_option"
save_ac_compile_for_check_decl="$ac_compile_for_check_decl"
saved_ac_compile_for_check_decl="$ac_compile_for_check_decl"
ac_compile_for_check_decl="$ac_compile_for_check_decl $gl_cv_compiler_check_future_option"
unset [ac_cv_have_decl_][$1]
AC_CHECK_DECL([$1], , , [$2])
ac_compile="$save_ac_compile"
ac_compile_for_check_decl="$save_ac_compile_for_check_decl"
ac_compile="$saved_ac_compile"
ac_compile_for_check_decl="$saved_ac_compile_for_check_decl"
[ac_cv_func_][$1]="$[ac_cv_have_decl_][$1]"
if test $[ac_cv_func_][$1] = yes; then
[gl_cv_onwards_func_][$1]=yes

View file

@ -677,7 +677,7 @@ AC_DEFUN([gl_INIT],
if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then :; else
AC_REQUIRE([AC_CANONICAL_HOST])
gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
if case $host_os in mingw*) false;; *) :;; esac; then
if case $host_os in mingw* | windows*) false;; *) :;; esac; then
func_gl_gnulib_m4code_open
fi
fi
@ -1005,13 +1005,13 @@ AC_DEFUN([gl_INIT],
if test $REPLACE_GETLINE = 1; then
func_gl_gnulib_m4code_getdelim
fi
if case $host_os in mingw*) false;; *) test $HAVE_GETLOADAVG = 0 || test $REPLACE_GETLOADAVG = 1;; esac; then
if case $host_os in mingw* | windows*) false;; *) test $HAVE_GETLOADAVG = 0 || test $REPLACE_GETLOADAVG = 1;; esac; then
func_gl_gnulib_m4code_open
fi
if test $REPLACE_GETOPT = 1; then
func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
fi
if case $host_os in mingw*) false;; *) test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1;; esac; then
if case $host_os in mingw* | windows*) false;; *) test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1;; esac; then
func_gl_gnulib_m4code_open
fi
if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then

View file

@ -1,7 +1,6 @@
# serial 14
# Copyright (C) 1999-2001, 2003-2007, 2009-2024 Free Software
# Foundation, Inc.
# Copyright (C) 1999-2001, 2003-2007, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View file

@ -1,4 +1,4 @@
# include_next.m4 serial 26
# include_next.m4 serial 27
dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -74,17 +74,17 @@ EOF
#endif
#define DEFINED_IN_CONFTESTD2
EOF
gl_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
gl_saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$gl_saved_CPPFLAGS -Iconftestd1b -Iconftestd2"
dnl We intentionally avoid using AC_LANG_SOURCE here.
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
[gl_cv_have_include_next=yes],
[CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
[CPPFLAGS="$gl_saved_CPPFLAGS -Iconftestd1a -Iconftestd2"
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
[gl_cv_have_include_next=buggy],
[gl_cv_have_include_next=no])
])
CPPFLAGS="$gl_save_CPPFLAGS"
CPPFLAGS="$gl_saved_CPPFLAGS"
rm -rf conftestd1a conftestd1b conftestd2
])
PRAGMA_SYSTEM_HEADER=

View file

@ -247,7 +247,7 @@ AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
AC_REQUIRE([AC_CANONICAL_HOST])
if test $ac_opt_found != yes; then
AS_CASE([$host_os],
[mingw*],
[mingw* | windows*],
[ac_cv_sys_largefile_opts="supported through gnulib"
ac_opt_found=yes]
)
@ -305,7 +305,7 @@ AC_DEFUN([gl_LARGEFILE],
[
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
mingw*)
mingw* | windows*)
dnl Native Windows.
dnl mingw64 defines off_t to a 64-bit type already, if
dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE.

Some files were not shown because too many files have changed in this diff Show more