1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

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

@ -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