Update from Gnulib by running admin/merge-gnulib

This commit is contained in:
Paul Eggert 2025-12-25 09:52:44 -08:00
parent 0a6daa1412
commit 7be4fe89fc
6 changed files with 146 additions and 89 deletions

View file

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex. % Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
% %
\def\texinfoversion{2025-12-06.19} \def\texinfoversion{2025-12-23.13}
% %
% Copyright 1985, 1986, 1988, 1990-2025 Free Software Foundation, Inc. % Copyright 1985, 1986, 1988, 1990-2025 Free Software Foundation, Inc.
% %
@ -10435,7 +10435,7 @@
\gdefchar^^af{\={}} \gdefchar^^af{\={}}
% %
\gdefchar^^b0{\textdegree} \gdefchar^^b0{\textdegree}
\gdefchar^^b1{$\pm$} \gdefchar^^b1{\ensuremath\pm}
\gdefchar^^b2{$^2$} \gdefchar^^b2{$^2$}
\gdefchar^^b3{$^3$} \gdefchar^^b3{$^3$}
\gdefchar^^b4{\'{}} \gdefchar^^b4{\'{}}
@ -10456,7 +10456,7 @@
\gdefchar^^c2{\^A} \gdefchar^^c2{\^A}
\gdefchar^^c3{\~A} \gdefchar^^c3{\~A}
\gdefchar^^c4{\"A} \gdefchar^^c4{\"A}
\gdefchar^^c5{\ringaccent A} \gdefchar^^c5{\AA}
\gdefchar^^c6{\AE} \gdefchar^^c6{\AE}
\gdefchar^^c7{\cedilla C} \gdefchar^^c7{\cedilla C}
\gdefchar^^c8{\`E} \gdefchar^^c8{\`E}
@ -10475,7 +10475,7 @@
\gdefchar^^d4{\^O} \gdefchar^^d4{\^O}
\gdefchar^^d5{\~O} \gdefchar^^d5{\~O}
\gdefchar^^d6{\"O} \gdefchar^^d6{\"O}
\gdefchar^^d7{$\times$} \gdefchar^^d7{\ensuremath\times}
\gdefchar^^d8{\O} \gdefchar^^d8{\O}
\gdefchar^^d9{\`U} \gdefchar^^d9{\`U}
\gdefchar^^da{\'U} \gdefchar^^da{\'U}
@ -10490,7 +10490,7 @@
\gdefchar^^e2{\^a} \gdefchar^^e2{\^a}
\gdefchar^^e3{\~a} \gdefchar^^e3{\~a}
\gdefchar^^e4{\"a} \gdefchar^^e4{\"a}
\gdefchar^^e5{\ringaccent a} \gdefchar^^e5{\aa}
\gdefchar^^e6{\ae} \gdefchar^^e6{\ae}
\gdefchar^^e7{\cedilla c} \gdefchar^^e7{\cedilla c}
\gdefchar^^e8{\`e} \gdefchar^^e8{\`e}
@ -10509,7 +10509,7 @@
\gdefchar^^f4{\^o} \gdefchar^^f4{\^o}
\gdefchar^^f5{\~o} \gdefchar^^f5{\~o}
\gdefchar^^f6{\"o} \gdefchar^^f6{\"o}
\gdefchar^^f7{$\div$} \gdefchar^^f7{\ensuremath\div}
\gdefchar^^f8{\o} \gdefchar^^f8{\o}
\gdefchar^^f9{\`u} \gdefchar^^f9{\`u}
\gdefchar^^fa{\'u} \gdefchar^^fa{\'u}
@ -10595,7 +10595,7 @@
\gdefchar^^d4{\^O} \gdefchar^^d4{\^O}
\gdefchar^^d5{\H O} \gdefchar^^d5{\H O}
\gdefchar^^d6{\"O} \gdefchar^^d6{\"O}
\gdefchar^^d7{$\times$} \gdefchar^^d7{\ensuremath\times}
\gdefchar^^d8{\v R} \gdefchar^^d8{\v R}
\gdefchar^^d9{\ringaccent U} \gdefchar^^d9{\ringaccent U}
\gdefchar^^da{\'U} \gdefchar^^da{\'U}
@ -10629,7 +10629,7 @@
\gdefchar^^f4{\^o} \gdefchar^^f4{\^o}
\gdefchar^^f5{\H o} \gdefchar^^f5{\H o}
\gdefchar^^f6{\"o} \gdefchar^^f6{\"o}
\gdefchar^^f7{$\div$} \gdefchar^^f7{\ensuremath\div}
\gdefchar^^f8{\v r} \gdefchar^^f8{\v r}
\gdefchar^^f9{\ringaccent u} \gdefchar^^f9{\ringaccent u}
\gdefchar^^fa{\'u} \gdefchar^^fa{\'u}

View file

@ -89,7 +89,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO, _GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NONNULL_IF_NONZERO, _GL_ATTRIBUTE_NONSTRING,
_GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE,
_GL_ATTRIBUTE_REPRODUCIBLE, _GL_ATTRIBUTE_RETURNS_NONNULL, _GL_ATTRIBUTE_REPRODUCIBLE, _GL_ATTRIBUTE_RETURNS_NONNULL,
_GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNSEQUENCED. */ _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNSEQUENCED, _GL_UNNAMED. */
#if !_GL_CONFIG_H_INCLUDED #if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first." #error "Please include config.h first."
#endif #endif
@ -240,62 +240,68 @@
/* Applies to: functions. */ /* Applies to: functions. */
#define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE #define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
/* It is OK for a compiler to move calls to the function and to omit /* It is OK for a compiler to move a call, or omit a duplicate call
calls to the function if another call has the same arguments or the and reuse a cached return value, even if the state changes between calls.
result is not used. It is also OK to omit a call if the result is not used.
This attribute is safe for a function that neither depends on This attribute is safe if the function does not change observable state,
nor affects state, and always returns exactly once - returns a value determined solely by its arguments' values
without examining state, and always returns exactly once -
e.g., does not raise an exception, call longjmp, or loop forever. e.g., does not raise an exception, call longjmp, or loop forever.
(This attribute is stricter than ATTRIBUTE_PURE because the (This attribute is stricter than _GL_ATTRIBUTE_PURE because the
function cannot observe state. It is stricter than UNSEQUENCED function cannot observe state. Unlike _GL_ATTRIBUTE_UNSEQUENCED
because the function must return exactly once and cannot depend on the function must return exactly once and cannot access state
state addressed by its arguments.) */ addressed by its pointer arguments or that happens to have the same
value for all calls to the function, but the function is allowed to
return a pointer to storage that can be modified later. */
/* Applies to: functions. */ /* Applies to: functions. */
#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
/* It is OK for a compiler to move calls to the function and to omit duplicate /* It is OK for a compiler to move a call, or omit a duplicate call
calls to the function with the same arguments, so long as the state and reuse a cached value returned either directly or indirectly via
addressed by its arguments is the same. a pointer, if the state addressed by its pointer arguments is the same;
however, pointer arguments cannot alias.
This attribute is safe for a function that is effectless, idempotent, This attribute is safe for a function that is effectless, idempotent,
stateless, and independent; see ISO C 23 § 6.7.13.8 for a definition of stateless, and independent; see ISO C 23 § 6.7.13.8 for a definition of
these terms. these terms.
(This attribute is stricter than REPRODUCIBLE because the function (This attribute is stricter than _GL_ATTRIBUTE_REPRODUCIBLE because
must be stateless and independent. It is looser than ATTRIBUTE_CONST the function must be stateless and independent. Unlike
because the function need not return exactly once and can depend _GL_ATTRIBUTE_CONST the function need not return exactly once, and
on state addressed by its arguments.) can depend on state accessed via its pointer arguments or that
happens to have the same value for all calls to the function, but
the function cannot return a pointer to storage whose contents
change later.)
See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
<https://stackoverflow.com/questions/76847905/>. <https://stackoverflow.com/questions/76847905/>. */
ATTENTION! Efforts are underway to change the meaning of this attribute.
See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3494.htm>. */
/* Applies to: functions, pointer to functions, function type. */ /* Applies to: functions, pointer to functions, function type. */
#define UNSEQUENCED _GL_ATTRIBUTE_UNSEQUENCED #define UNSEQUENCED _GL_ATTRIBUTE_UNSEQUENCED
/* It is OK for a compiler to move calls to the function and to omit /* It is OK for a compiler to move a call, or omit a duplicate call
calls to the function if another call has the same arguments or the and reuse a cached return value, if observable state is the same.
result is not used, and if observable state is the same. It is also OK to omit a call if the return value is not used.
This attribute is safe for a function that does not affect observable state This attribute is safe if the function does not change observable state,
and always returns exactly once. returns a value determined solely by its arguments's values
(This attribute is looser than ATTRIBUTE_CONST because the function together with observable state, and always returns exactly once.
can depend on observable state. It is stricter than REPRODUCIBLE (This attribute is looser than _GL_ATTRIBUTE_CONST because the function
because the function must return exactly once and cannot affect can depend on observable state.
state addressed by its arguments.) */ Unlike _GL_ATTRIBUTE_REPRODUCIBLE the function must return exactly
once and cannot change state addressed by its arguments, but the
function can return a pointer to storage whose contents change later.) */
/* Applies to: functions. */ /* Applies to: functions. */
#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE #define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
/* It is OK for a compiler to move calls to the function and to omit duplicate /* It is OK for a compiler to move a call, or omit a duplicate call
calls to the function with the same arguments, so long as the state and reuse a cached value returned either directly or indirectly via
addressed by its arguments is the same and is updated in time for a pointer, if other observable state is the same;
the rest of the program. however, pointer arguments cannot alias.
This attribute is safe for a function that is effectless and idempotent; see This attribute is safe for a function that is effectless and idempotent;
ISO C 23 § 6.7.13.8 for a definition of these terms. see ISO C 23 § 6.7.13.8 for a definition of these terms.
(This attribute is looser than UNSEQUENCED because the function need (This attribute is looser than _GL_ATTRIBUTE_UNSEQUENCED because
not be stateless and idempotent. It is looser than ATTRIBUTE_PURE the function need not be stateless or independent.
because the function need not return exactly once and can affect Unlike _GL_ATTRIBUTE_PURE the function need not return exactly once
state addressed by its arguments.) and can change state addressed by its pointer arguments, but the
function cannot return a pointer to storage whose contents change later.)
See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
<https://stackoverflow.com/questions/76847905/>. <https://stackoverflow.com/questions/76847905/>. */
ATTENTION! Efforts are underway to change the meaning of this attribute.
See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3494.htm>. */
/* Applies to: functions, pointer to functions, function type. */ /* Applies to: functions, pointer to functions, function type. */
#define REPRODUCIBLE _GL_ATTRIBUTE_REPRODUCIBLE #define REPRODUCIBLE _GL_ATTRIBUTE_REPRODUCIBLE
@ -328,4 +334,18 @@
#define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS #define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS
/* ==================== Unnamed function parameters ======================== */
/* Although UNNAMED is not an attribute, it is related to MAYBE_UNUSED
and so is defined here for convenience. */
/* UNNAMED (ID) is the "name" of an unnamed function parameter.
Each of the function's unnamed parameters should have a unique "name".
The "name" cannot be used. This ports both to C17 and earlier, which
lack unnamed parameters, and to C++ and later C, which have them. */
/* Applies to:
- function parameters. */
#define UNNAMED(id) _GL_UNNAMED (id)
#endif /* _GL_ATTRIBUTE_H */ #endif /* _GL_ATTRIBUTE_H */

View file

@ -79,16 +79,15 @@ smack_smackfs_path (void)
return NULL; return NULL;
} }
static ssize_t static ssize_t
smack_new_label_from_path (MAYBE_UNUSED const char *path, smack_new_label_from_path (const char *UNNAMED (path),
MAYBE_UNUSED const char *xattr, const char *UNNAMED (xattr),
MAYBE_UNUSED int follow, MAYBE_UNUSED char **label) int UNNAMED (follow), char **UNNAMED (label))
{ {
return -1; return -1;
} }
static ssize_t static ssize_t
smack_new_label_from_file (MAYBE_UNUSED int fd, smack_new_label_from_file (int UNNAMED (fd), const char *UNNAMED (xattr),
MAYBE_UNUSED const char *xattr, char **UNNAMED (label))
MAYBE_UNUSED char **label)
{ {
return -1; return -1;
} }

View file

@ -20,7 +20,7 @@
#define TIMESPEC_H #define TIMESPEC_H
/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_CONST, /* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_CONST,
_GL_ATTRIBUTE_PURE, _GL_CMP. */ _GL_CMP. */
#if !_GL_CONFIG_H_INCLUDED #if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first." #error "Please include config.h first."
#endif #endif
@ -60,7 +60,7 @@ make_timespec (time_t s, long int ns)
/* Return negative, zero, positive if A < B, A == B, A > B, respectively. */ /* Return negative, zero, positive if A < B, A == B, A > B, respectively. */
_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE _GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_CONST
timespec_cmp (struct timespec a, struct timespec b) timespec_cmp (struct timespec a, struct timespec b)
{ {
return 2 * _GL_CMP (a.tv_sec, b.tv_sec) + _GL_CMP (a.tv_nsec, b.tv_nsec); return 2 * _GL_CMP (a.tv_sec, b.tv_sec) + _GL_CMP (a.tv_nsec, b.tv_nsec);
@ -68,10 +68,10 @@ timespec_cmp (struct timespec a, struct timespec b)
/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be /* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be
nonnegative. */ nonnegative. */
_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE _GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_CONST
timespec_sign (struct timespec a) timespec_sign (struct timespec a)
{ {
return _GL_CMP (a.tv_sec, 0) + (!a.tv_sec & !!a.tv_nsec); return _GL_CMP (a.tv_sec | a.tv_nsec, 0);
} }
struct timespec timespec_add (struct timespec, struct timespec) struct timespec timespec_add (struct timespec, struct timespec)

View file

@ -422,15 +422,17 @@ AC_DEFUN([gl_COMMON_BODY], [
without examining state, and always returns exactly once - without examining state, and always returns exactly once -
e.g., does not raise an exception, call longjmp, or loop forever. e.g., does not raise an exception, call longjmp, or loop forever.
(This attribute is stricter than _GL_ATTRIBUTE_PURE because the (This attribute is stricter than _GL_ATTRIBUTE_PURE because the
function cannot observe state. It is stricter than function cannot observe state. Unlike _GL_ATTRIBUTE_UNSEQUENCED
_GL_ATTRIBUTE_UNSEQUENCED because the function must return exactly the function must return exactly once and cannot access state
once and cannot access state addressed by its arguments.) */ addressed by its pointer arguments or that happens to have the same
value for all calls to the function, but the function is allowed to
return a pointer to storage that can be modified later. */
/* Applies to: functions. */ /* Applies to: functions. */
#ifndef _GL_ATTRIBUTE_CONST #ifndef _GL_ATTRIBUTE_CONST
# if _GL_HAS_ATTRIBUTE (const) # if _GL_HAS_ATTRIBUTE (const)
# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
# else # else
# define _GL_ATTRIBUTE_CONST _GL_ATTRIBUTE_UNSEQUENCED # define _GL_ATTRIBUTE_CONST
# endif # endif
#endif #endif
@ -591,7 +593,9 @@ AC_DEFUN([gl_COMMON_BODY], [
/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if /* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if
the entity is not used. The compiler should not warn if the entity is not the entity is not used. The compiler should not warn if the entity is not
used. */ used. However, 'int _GL_UNNAMED (i)' is preferable to
'_GL_ATTRIBUTE_MAYBE_UNUSED int i' when parameter I is unused
regardless of preprocessor macro settings. */
/* Applies to: /* Applies to:
- function, variable, - function, variable,
- struct, union, struct/union member, - struct, union, struct/union member,
@ -752,34 +756,33 @@ AC_DEFUN([gl_COMMON_BODY], [
returns a value determined solely by its arguments's values returns a value determined solely by its arguments's values
together with observable state, and always returns exactly once. together with observable state, and always returns exactly once.
(This attribute is looser than _GL_ATTRIBUTE_CONST because the function (This attribute is looser than _GL_ATTRIBUTE_CONST because the function
can depend on observable state. It is stricter than can depend on observable state.
_GL_ATTRIBUTE_REPRODUCIBLE because the function must return exactly Unlike _GL_ATTRIBUTE_REPRODUCIBLE the function must return exactly
once and cannot change state addressed by its arguments.) */ once and cannot change state addressed by its arguments, but the
function can return a pointer to storage whose contents change later.) */
/* Applies to: functions. */ /* Applies to: functions. */
#ifndef _GL_ATTRIBUTE_PURE #ifndef _GL_ATTRIBUTE_PURE
# if _GL_HAS_ATTRIBUTE (pure) # if _GL_HAS_ATTRIBUTE (pure)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else # else
# define _GL_ATTRIBUTE_PURE _GL_ATTRIBUTE_REPRODUCIBLE # define _GL_ATTRIBUTE_PURE
# endif # endif
#endif #endif
/* _GL_ATTRIBUTE_REPRODUCIBLE declares: /* _GL_ATTRIBUTE_REPRODUCIBLE declares:
It is OK for a compiler to move a call, or omit a duplicate call It is OK for a compiler to move a call, or omit a duplicate call
and reuse a cached value returned either directly or indirectly and reuse a cached value returned either directly or indirectly via
via a pointer argument, if other observable state is the same; a pointer, if other observable state is the same;
however, these pointer arguments cannot alias. however, pointer arguments cannot alias.
This attribute is safe for a function that is effectless and idempotent; This attribute is safe for a function that is effectless and idempotent;
see ISO C 23 § 6.7.13.8 for a definition of these terms. see ISO C 23 § 6.7.13.8 for a definition of these terms.
(This attribute is looser than _GL_ATTRIBUTE_UNSEQUENCED because (This attribute is looser than _GL_ATTRIBUTE_UNSEQUENCED because
the function need not be stateless or independent. It is looser the function need not be stateless or independent.
from _GL_ATTRIBUTE_PURE because the function need not return Unlike _GL_ATTRIBUTE_PURE the function need not return exactly once
exactly once, and it can change state addressed by its pointer arguments and can change state addressed by its pointer arguments, but the
that do not alias.) function cannot return a pointer to storage whose contents change later.)
See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
<https://stackoverflow.com/questions/76847905/>. <https://stackoverflow.com/questions/76847905/>. */
ATTENTION! Efforts are underway to change the meaning of this attribute.
See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3494.htm>. */
/* Applies to: functions, pointer to functions, function types. */ /* Applies to: functions, pointer to functions, function types. */
#ifndef _GL_ATTRIBUTE_REPRODUCIBLE #ifndef _GL_ATTRIBUTE_REPRODUCIBLE
/* This may be revisited when gcc and clang support [[reproducible]] or possibly /* This may be revisited when gcc and clang support [[reproducible]] or possibly
@ -820,20 +823,21 @@ AC_DEFUN([gl_COMMON_BODY], [
/* _GL_ATTRIBUTE_UNSEQUENCED declares: /* _GL_ATTRIBUTE_UNSEQUENCED declares:
It is OK for a compiler to move a call, or omit a duplicate call It is OK for a compiler to move a call, or omit a duplicate call
and reuse a cached return value, addressed by its arguments is the same. and reuse a cached value returned either directly or indirectly via
a pointer, if the state addressed by its pointer arguments is the same;
however, pointer arguments cannot alias.
This attribute is safe for a function that is effectless, idempotent, This attribute is safe for a function that is effectless, idempotent,
stateless, and independent; see ISO C 23 § 6.7.13.8 for a definition of stateless, and independent; see ISO C 23 § 6.7.13.8 for a definition of
these terms. these terms.
(This attribute is stricter than _GL_ATTRIBUTE_REPRODUCIBLE because (This attribute is stricter than _GL_ATTRIBUTE_REPRODUCIBLE because
the function must be stateless and independent. It differs from the function must be stateless and independent. Unlike
_GL_ATTRIBUTE_CONST because the function need not return exactly _GL_ATTRIBUTE_CONST the function need not return exactly once, and
once and can depend on state accessed via its pointer arguments can depend on state accessed via its pointer arguments or that
that do not alias, or on other state that happens to have the happens to have the same value for all calls to the function, but
same value for all calls to the function.) the function cannot return a pointer to storage whose contents
change later.)
See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
<https://stackoverflow.com/questions/76847905/>. <https://stackoverflow.com/questions/76847905/>. */
ATTENTION! Efforts are underway to change the meaning of this attribute.
See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3494.htm>. */
/* Applies to: functions, pointer to functions, function types. */ /* Applies to: functions, pointer to functions, function types. */
#ifndef _GL_ATTRIBUTE_UNSEQUENCED #ifndef _GL_ATTRIBUTE_UNSEQUENCED
/* This may be revisited when gcc and clang support [[unsequenced]] or possibly /* This may be revisited when gcc and clang support [[unsequenced]] or possibly
@ -873,6 +877,21 @@ AC_DEFUN([gl_COMMON_BODY], [
# endif # endif
#endif #endif
/* _GL_UNNAMED (ID) is the "name" of an unnamed function parameter.
Each of the function's unnamed parameters should have a unique "name".
The "name" cannot be used. This ports both to C17 and earlier, which
lack unnamed parameters, and to C++ and later C, which have them. */
/* Applies to:
- function parameters. */
#ifndef _GL_UNNAMED
# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202311 \
&& !defined __cplusplus)
# define _GL_UNNAMED(id) unnamed_##id _GL_ATTRIBUTE_UNUSED
# else
# define _GL_UNNAMED(id)
# endif
#endif
/* The following attributes enable detection of multithread-safety problems /* The following attributes enable detection of multithread-safety problems
and resource leaks at compile-time, by clang ≥ 15, when the warning option and resource leaks at compile-time, by clang ≥ 15, when the warning option
-Wthread-safety is enabled. For usage, see -Wthread-safety is enabled. For usage, see

View file

@ -1,5 +1,5 @@
# nanosleep.m4 # nanosleep.m4
# serial 47 # serial 48
dnl Copyright (C) 1999-2001, 2003-2025 Free Software Foundation, Inc. dnl Copyright (C) 1999-2001, 2003-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -144,6 +144,25 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
;; ;;
esac esac
else else
# Replace the static inline function on mingw which requires linking to
# libwinpthreads.
AC_CACHE_CHECK([for static inline nanosleep],
[gl_cv_static_inline_nanosleep],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <time.h>]],
[[
static struct timespec ts1;
static struct timespec ts2;
return nanosleep (&ts1, &ts2);
]])
],
[gl_cv_static_inline_nanosleep=yes],
[gl_cv_static_inline_nanosleep=no])
])
if test $gl_cv_static_inline_nanosleep = yes; then
REPLACE_NANOSLEEP=1
fi
HAVE_NANOSLEEP=0 HAVE_NANOSLEEP=0
fi fi
LIBS=$gl_saved_LIBS LIBS=$gl_saved_LIBS