1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Update Gnulib to v0.1-5703-g356a414e8c and add 'posix_spawn' module.

This is a followup to edfca3b7e5, which
added the 'posix_spawnp' module but not 'posix_spawn'.

* m4/gnulib-cache.m4: Add 'posix_spawn' module.
* gnulib-local/m4/clock_time.m4.diff: Adjust.
* configure.ac: Move 'gl_EARLY' use right after 'AC_PROG_CC'.
This commit is contained in:
Ludovic Courtès 2023-01-18 18:25:25 +01:00
parent 4404b553a5
commit aeb22f4861
509 changed files with 2764 additions and 1730 deletions

View file

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2022 Free Software Foundation, Inc.
# Copyright (C) 2002-2023 Free Software Foundation, Inc.
#
# 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
@ -110,6 +110,7 @@
# pipe-posix \
# pipe2 \
# poll \
# posix_spawn \
# posix_spawnp \
# putenv \
# readlink \
@ -168,10 +169,15 @@ EXTRA_libgnu_la_SOURCES =
libgnu_la_LDFLAGS = $(AM_LDFLAGS)
libgnu_la_LDFLAGS += -no-undefined
libgnu_la_LDFLAGS += $(CEIL_LIBM)
libgnu_la_LDFLAGS += $(CLOCK_TIME_LIB)
libgnu_la_LDFLAGS += $(COPYSIGN_LIBM)
libgnu_la_LDFLAGS += $(DUPLOCALE_LIB)
libgnu_la_LDFLAGS += $(FLOOR_LIBM)
libgnu_la_LDFLAGS += $(FREXP_LIBM)
libgnu_la_LDFLAGS += $(GETADDRINFO_LIB)
libgnu_la_LDFLAGS += $(GETLOGIN_LIB)
libgnu_la_LDFLAGS += $(GETRANDOM_LIB)
libgnu_la_LDFLAGS += $(HARD_LOCALE_LIB)
libgnu_la_LDFLAGS += $(HOSTENT_LIB)
libgnu_la_LDFLAGS += $(INET_NTOP_LIB)
libgnu_la_LDFLAGS += $(INET_PTON_LIB)
@ -181,22 +187,18 @@ libgnu_la_LDFLAGS += $(ISNANL_LIBM)
libgnu_la_LDFLAGS += $(LDEXP_LIBM)
libgnu_la_LDFLAGS += $(LIBSOCKET)
libgnu_la_LDFLAGS += $(LIBTHREAD)
libgnu_la_LDFLAGS += $(LIB_CLOCK_GETTIME)
libgnu_la_LDFLAGS += $(LIB_DUPLOCALE)
libgnu_la_LDFLAGS += $(LIB_GETLOGIN)
libgnu_la_LDFLAGS += $(LIB_GETRANDOM)
libgnu_la_LDFLAGS += $(LIB_HARD_LOCALE)
libgnu_la_LDFLAGS += $(LIB_MBRTOWC)
libgnu_la_LDFLAGS += $(LIB_POLL)
libgnu_la_LDFLAGS += $(LIB_SELECT)
libgnu_la_LDFLAGS += $(LIB_SETLOCALE_NULL)
libgnu_la_LDFLAGS += $(LOG1P_LIBM)
libgnu_la_LDFLAGS += $(LOG_LIBM)
libgnu_la_LDFLAGS += $(LTLIBICONV)
libgnu_la_LDFLAGS += $(LTLIBINTL)
libgnu_la_LDFLAGS += $(LTLIBUNISTRING)
libgnu_la_LDFLAGS += $(MBRTOWC_LIB)
libgnu_la_LDFLAGS += $(POLL_LIB)
libgnu_la_LDFLAGS += $(POSIX_SPAWN_LIB)
libgnu_la_LDFLAGS += $(ROUND_LIBM)
libgnu_la_LDFLAGS += $(SELECT_LIB)
libgnu_la_LDFLAGS += $(SERVENT_LIB)
libgnu_la_LDFLAGS += $(SETLOCALE_NULL_LIB)
libgnu_la_LDFLAGS += $(TRUNC_LIBM)
## begin gnulib module absolute-header
@ -318,6 +320,37 @@ EXTRA_DIST += arpa_inet.in.h
## end gnulib module arpa_inet
## begin gnulib module assert-h
BUILT_SOURCES += $(ASSERT_H)
# We need the following in order to create <assert.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_ASSERT_H
assert.h: assert.in.h verify.h $(top_builddir)/config.status
$(gl_V_at){ $(SED_HEADER_STDOUT) \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_ASSERT_H''@|$(NEXT_ASSERT_H)|g' \
< $(srcdir)/assert.in.h && \
sed -e '/@assert.h omit start@/,/@assert.h omit end@/d' \
-e 's|_gl_verify|_gl_static_assert|g' \
-e 's|_GL_VERIFY|_GL_STATIC_ASSERT|g' \
-e 's|_GL\(_STATIC_ASSERT_H\)|_GL\1|g' \
< $(srcdir)/verify.h; \
} > $@-t
$(AM_V_at)mv $@-t $@
else
assert.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += assert.h assert.h-t
EXTRA_DIST += assert.in.h verify.h
## end gnulib module assert-h
## begin gnulib module assure
if gl_GNULIB_ENABLED_assure
@ -549,41 +582,6 @@ endif
## end gnulib module duplocale
## begin gnulib module dynarray
if gl_GNULIB_ENABLED_dynarray
BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
malloc/dynarray.gl.h: malloc/dynarray.h
$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
$(AM_V_at)$(SED_HEADER_STDOUT) \
-e '/libc_hidden_proto/d' \
$(srcdir)/malloc/dynarray.h > $@-t
$(AM_V_at)mv $@-t $@
MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
$(AM_V_at)$(SED_HEADER_STDOUT) \
-e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
-e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
-e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
-e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
-e 's|__glibc_likely|_GL_LIKELY|g' \
-e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
$(srcdir)/malloc/dynarray-skeleton.c > $@-t
$(AM_V_at)mv $@-t $@
MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t
libgnu_la_SOURCES += malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c malloc/dynarray_resize.c malloc/dynarray_resize_clear.c
endif
EXTRA_DIST += dynarray.h malloc/dynarray-skeleton.c malloc/dynarray.h
EXTRA_libgnu_la_SOURCES += malloc/dynarray-skeleton.c
## end gnulib module dynarray
## begin gnulib module eloop-threshold
if gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c
@ -924,6 +922,64 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog
## end gnulib module gitlog-to-changelog
## begin gnulib module glibc-internal/dynarray
if gl_GNULIB_ENABLED_fd38c7e463b54744b77b98aeafb4fa7c
BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
malloc/dynarray.gl.h: malloc/dynarray.h
$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
$(AM_V_at)$(SED_HEADER_STDOUT) \
-e '/libc_hidden_proto/d' \
$(srcdir)/malloc/dynarray.h > $@-t
$(AM_V_at)mv $@-t $@
MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
$(AM_V_at)$(SED_HEADER_STDOUT) \
-e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
-e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
-e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
-e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
-e 's|__glibc_likely|_GL_LIKELY|g' \
-e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
$(srcdir)/malloc/dynarray-skeleton.c > $@-t
$(AM_V_at)mv $@-t $@
MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t
libgnu_la_SOURCES += malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c malloc/dynarray_resize.c malloc/dynarray_resize_clear.c
endif
EXTRA_DIST += dynarray.h malloc/dynarray-skeleton.c malloc/dynarray.h
EXTRA_libgnu_la_SOURCES += malloc/dynarray-skeleton.c
## end gnulib module glibc-internal/dynarray
## begin gnulib module glibc-internal/scratch_buffer
if gl_GNULIB_ENABLED_8444034ea779b88768865bb60b4fb8c9
BUILT_SOURCES += malloc/scratch_buffer.gl.h
malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h
$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
$(AM_V_at)$(SED_HEADER_STDOUT) \
-e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \
-e 's|__glibc_likely|_GL_LIKELY|g' \
-e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
-e '/libc_hidden_proto/d' \
$(srcdir)/malloc/scratch_buffer.h > $@-t
$(AM_V_at)mv $@-t $@
MOSTLYCLEANFILES += malloc/scratch_buffer.gl.h malloc/scratch_buffer.gl.h-t
libgnu_la_SOURCES += malloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_preserve.c malloc/scratch_buffer_set_array_size.c
endif
EXTRA_DIST += malloc/scratch_buffer.h scratch_buffer.h
## end gnulib module glibc-internal/scratch_buffer
## begin gnulib module gnu-web-doc-update
@ -1992,6 +2048,14 @@ EXTRA_DIST += poll.in.h
## end gnulib module poll-h
## begin gnulib module posix_spawn
if GL_COND_OBJ_SPAWN
libgnu_la_SOURCES += spawn.c
endif
## end gnulib module posix_spawn
## begin gnulib module posix_spawn-internal
if gl_GNULIB_ENABLED_332607f759618fb73dfc3076748afea7
@ -2183,29 +2247,6 @@ EXTRA_DIST += sched.in.h
## end gnulib module sched
## begin gnulib module scratch_buffer
if gl_GNULIB_ENABLED_scratch_buffer
BUILT_SOURCES += malloc/scratch_buffer.gl.h
malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h
$(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
$(AM_V_at)$(SED_HEADER_STDOUT) \
-e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \
-e 's|__glibc_likely|_GL_LIKELY|g' \
-e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
-e '/libc_hidden_proto/d' \
$(srcdir)/malloc/scratch_buffer.h > $@-t
$(AM_V_at)mv $@-t $@
MOSTLYCLEANFILES += malloc/scratch_buffer.gl.h malloc/scratch_buffer.gl.h-t
libgnu_la_SOURCES += malloc/scratch_buffer_dupfree.c malloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_preserve.c malloc/scratch_buffer_set_array_size.c
endif
EXTRA_DIST += malloc/scratch_buffer.h scratch_buffer.h
## end gnulib module scratch_buffer
## begin gnulib module select
if GL_COND_OBJ_SELECT
@ -2495,48 +2536,6 @@ EXTRA_DIST += stat-time.h
## end gnulib module stat-time
## begin gnulib module stdalign
BUILT_SOURCES += $(STDALIGN_H)
# We need the following in order to create <stdalign.h> when the system
# doesn't have one that works.
if GL_GENERATE_STDALIGN_H
stdalign.h: stdalign.in.h $(top_builddir)/config.status
$(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/stdalign.in.h
$(AM_V_at)mv $@-t $@
else
stdalign.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += stdalign.h stdalign.h-t
EXTRA_DIST += stdalign.in.h
## end gnulib module stdalign
## begin gnulib module stdbool
BUILT_SOURCES += $(STDBOOL_H)
# We need the following in order to create <stdbool.h> when the system
# doesn't have one that works.
if GL_GENERATE_STDBOOL_H
stdbool.h: stdbool.in.h $(top_builddir)/config.status
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
$(srcdir)/stdbool.in.h > $@-t
$(AM_V_at)mv $@-t $@
else
stdbool.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += stdbool.h stdbool.h-t
EXTRA_DIST += stdbool.in.h
## end gnulib module stdbool
## begin gnulib module stdckdint
BUILT_SOURCES += $(STDCKDINT_H)
@ -2715,7 +2714,9 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
-e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
-e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
-e 's|@''HAVE_DECL_GETW''@|$(HAVE_DECL_GETW)|g' \
-e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
-e 's|@''HAVE_DECL_PUTW''@|$(HAVE_DECL_PUTW)|g' \
-e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
-e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
-e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
@ -3013,6 +3014,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \
-e 's/@''GNULIB_MEMSET_EXPLICIT''@/$(GL_GNULIB_MEMSET_EXPLICIT)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \
@ -3044,6 +3046,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
-e 's|@''HAVE_MEMSET_EXPLICIT''@|$(HAVE_MEMSET_EXPLICIT)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \

View file

@ -1,5 +1,5 @@
/* A C macro for declaring that a function does not return.
Copyright (C) 2011-2022 Free Software Foundation, Inc.
Copyright (C) 2011-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published

View file

@ -1,6 +1,6 @@
/* accept.c --- wrappers for Windows accept function
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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,5 +1,5 @@
/* Accept a connection on a socket, with specific opening flags.
Copyright (C) 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2009-2023 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,5 +1,5 @@
/* Test the access rights of a file.
Copyright (C) 2019-2022 Free Software Foundation, Inc.
Copyright (C) 2019-2023 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,5 +1,5 @@
/* Determine alignment of types.
Copyright (C) 2003-2004, 2006, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2003-2004, 2006, 2009-2023 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
@ -22,15 +22,14 @@
/* alignof_slot (TYPE)
Determine the alignment of a structure slot (field) of a given type,
at compile time. Note that the result depends on the ABI.
This is the same as alignof (TYPE) and _Alignof (TYPE), defined in
<stdalign.h> if __alignof_is_defined is 1.
This is the same as alignof (TYPE).
Note: The result cannot be used as a value for an 'enum' constant,
due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
#if defined __cplusplus
template <class type> struct alignof_helper { char __slot1; type __slot2; };
# define alignof_slot(type) offsetof (alignof_helper<type>, __slot2)
#else
# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
# define alignof_slot(type) alignof (type)
#endif
/* alignof_type (TYPE)

View file

@ -1,6 +1,6 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation,
Copyright (C) 1995, 1999, 2001-2004, 2006-2023 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2009-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published

View file

@ -1,6 +1,6 @@
/* A GNU-like <arpa/inet.h>.
Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2008-2023 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,5 +1,5 @@
/* Formatted output to strings.
Copyright (C) 1999, 2002, 2006, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2006, 2009-2023 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

27
lib/assert.in.h Normal file
View file

@ -0,0 +1,27 @@
/* Substitute for and wrapper around <assert.h>
Copyright (C) 2011-2023 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
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Do not guard the include, since <assert.h> is supposed to define
the assert macro each time it is included. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
#@INCLUDE_NEXT@ @NEXT_ASSERT_H@
/* The definition of static_assert is copied here. */

View file

@ -1,6 +1,6 @@
/* Run-time assert-like macros.
Copyright (C) 2014-2022 Free Software Foundation, Inc.
Copyright (C) 2014-2023 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,6 @@
/* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
Copyright 2020-2022 Free Software Foundation, Inc.
Copyright 2020-2023 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
@ -32,7 +32,7 @@
/* This file defines two types of attributes:
* C2x standard attributes. These have macro names that do not begin with
* C23 standard attributes. These have macro names that do not begin with
'ATTRIBUTE_'.
* Selected GCC attributes; see:
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html

View file

@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2022 Free Software
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@ -21,7 +21,6 @@
/* Specification. */
#include "basename-lgpl.h"
#include <stdbool.h>
#include <string.h>
#include "filename.h"

View file

@ -1,6 +1,6 @@
/* Extract the last component (base name) of a file name.
Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation,
Copyright (C) 1998, 2001, 2003-2006, 2009-2023 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Binary mode I/O.
Copyright 2017-2022 Free Software Foundation, Inc.
Copyright 2017-2023 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,5 +1,5 @@
/* Binary mode I/O.
Copyright (C) 2001, 2003, 2005, 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2001, 2003, 2005, 2008-2023 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,6 @@
/* bind.c --- wrappers for Windows bind function
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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,5 +1,5 @@
/* Convert unibyte character to wide character.
Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* byteswap.h - Byte swapping
Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2005, 2007, 2009-2023 Free Software Foundation, Inc.
Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005.
This file is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
Copyright (C) 2010-2022 Free Software Foundation, Inc.
Copyright (C) 2010-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published

View file

@ -1,6 +1,6 @@
/* Character handling in C locale.
Copyright (C) 2003-2022 Free Software Foundation, Inc.
Copyright (C) 2003-2023 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

@ -5,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
Copyright (C) 2000-2003, 2006, 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2000-2003, 2006, 2008-2023 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
@ -23,8 +23,6 @@
#ifndef C_CTYPE_H
#define C_CTYPE_H
#include <stdbool.h>
#ifndef _GL_INLINE_HEADER_BEGIN
#error "Please include config.h first."
#endif

View file

@ -1,5 +1,5 @@
/* Case-insensitive string comparison functions in C locale.
Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2022 Free Software
Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* c-strcasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 1998-1999, 2005-2006, 2009-2023 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,5 +1,5 @@
/* Optimized case-insensitive string comparison in C locale.
Copyright (C) 2001-2002, 2007, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2002, 2007, 2009-2023 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,5 +1,5 @@
/* c-strncasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 1998-1999, 2005-2006, 2009-2023 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,5 +1,5 @@
/* Return the canonical absolute name of a given file.
Copyright (C) 1996-2022 Free Software Foundation, Inc.
Copyright (C) 1996-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -30,7 +30,6 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
@ -48,6 +47,7 @@
#else
# define __canonicalize_file_name canonicalize_file_name
# define __realpath realpath
# define __strdup strdup
# include "pathmax.h"
# define __faccessat faccessat
# if defined _WIN32 && !defined __CYGWIN__
@ -180,27 +180,16 @@ get_path_max (void)
return path_max < 0 ? 1024 : path_max <= IDX_MAX ? path_max : IDX_MAX;
}
/* Act like __realpath (see below), with an additional argument
rname_buf that can be used as temporary storage.
/* Scratch buffers used by realpath_stk and managed by __realpath. */
struct realpath_bufs
{
struct scratch_buffer rname;
struct scratch_buffer extra;
struct scratch_buffer link;
};
If GCC_LINT is defined, do not inline this function with GCC 10.1
and later, to avoid creating a pointer to the stack that GCC
-Wreturn-local-addr incorrectly complains about. See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644
Although the noinline attribute can hurt performance a bit, no better way
to pacify GCC is known; even an explicit #pragma does not pacify GCC.
When the GCC bug is fixed this workaround should be limited to the
broken GCC versions. */
# if __GNUC_PREREQ (10, 1)
# if defined GCC_LINT || defined lint
__attribute__ ((__noinline__))
# elif __OPTIMIZE__ && !__NO_INLINE__
# define GCC_BOGUS_WRETURN_LOCAL_ADDR
# endif
# endif
static char *
realpath_stk (const char *name, char *resolved,
struct scratch_buffer *rname_buf)
realpath_stk (const char *name, char *resolved, struct realpath_bufs *bufs)
{
char *dest;
char const *start;
@ -225,12 +214,7 @@ realpath_stk (const char *name, char *resolved,
return NULL;
}
struct scratch_buffer extra_buffer, link_buffer;
scratch_buffer_init (&extra_buffer);
scratch_buffer_init (&link_buffer);
scratch_buffer_init (rname_buf);
char *rname_on_stack = rname_buf->data;
char *rname = rname_on_stack;
char *rname = bufs->rname.data;
bool end_in_extra_buffer = false;
bool failed = true;
@ -240,16 +224,16 @@ realpath_stk (const char *name, char *resolved,
if (!IS_ABSOLUTE_FILE_NAME (name))
{
while (!__getcwd (rname, rname_buf->length))
while (!__getcwd (bufs->rname.data, bufs->rname.length))
{
if (errno != ERANGE)
{
dest = rname;
goto error;
}
if (!scratch_buffer_grow (rname_buf))
goto error_nomem;
rname = rname_buf->data;
if (!scratch_buffer_grow (&bufs->rname))
return NULL;
rname = bufs->rname.data;
}
dest = __rawmemchr (rname, '\0');
start = name;
@ -303,13 +287,13 @@ realpath_stk (const char *name, char *resolved,
if (!ISSLASH (dest[-1]))
*dest++ = '/';
while (rname + rname_buf->length - dest
while (rname + bufs->rname.length - dest
< startlen + sizeof dir_suffix)
{
idx_t dest_offset = dest - rname;
if (!scratch_buffer_grow_preserve (rname_buf))
goto error_nomem;
rname = rname_buf->data;
if (!scratch_buffer_grow_preserve (&bufs->rname))
return NULL;
rname = bufs->rname.data;
dest = rname + dest_offset;
}
@ -320,13 +304,13 @@ realpath_stk (const char *name, char *resolved,
ssize_t n;
while (true)
{
buf = link_buffer.data;
idx_t bufsize = link_buffer.length;
buf = bufs->link.data;
idx_t bufsize = bufs->link.length;
n = __readlink (rname, buf, bufsize - 1);
if (n < bufsize - 1)
break;
if (!scratch_buffer_grow (&link_buffer))
goto error_nomem;
if (!scratch_buffer_grow (&bufs->link))
return NULL;
}
if (0 <= n)
{
@ -338,7 +322,7 @@ realpath_stk (const char *name, char *resolved,
buf[n] = '\0';
char *extra_buf = extra_buffer.data;
char *extra_buf = bufs->extra.data;
idx_t end_idx IF_LINT (= 0);
if (end_in_extra_buffer)
end_idx = end - extra_buf;
@ -346,13 +330,13 @@ realpath_stk (const char *name, char *resolved,
if (INT_ADD_OVERFLOW (len, n))
{
__set_errno (ENOMEM);
goto error_nomem;
return NULL;
}
while (extra_buffer.length <= len + n)
while (bufs->extra.length <= len + n)
{
if (!scratch_buffer_grow_preserve (&extra_buffer))
goto error_nomem;
extra_buf = extra_buffer.data;
if (!scratch_buffer_grow_preserve (&bufs->extra))
return NULL;
extra_buf = bufs->extra.data;
}
if (end_in_extra_buffer)
end = extra_buf + end_idx;
@ -404,20 +388,30 @@ realpath_stk (const char *name, char *resolved,
error:
*dest++ = '\0';
if (resolved != NULL && dest - rname <= get_path_max ())
rname = strcpy (resolved, rname);
error_nomem:
scratch_buffer_free (&extra_buffer);
scratch_buffer_free (&link_buffer);
if (failed || rname == resolved)
if (resolved != NULL)
{
scratch_buffer_free (rname_buf);
return failed ? NULL : resolved;
/* Copy the full result on success or partial result if failure was due
to the path not existing or not being accessible. */
if ((!failed || errno == ENOENT || errno == EACCES)
&& dest - rname <= get_path_max ())
{
strcpy (resolved, rname);
if (failed)
return NULL;
else
return resolved;
}
if (!failed)
__set_errno (ENAMETOOLONG);
return NULL;
}
else
{
if (failed)
return NULL;
else
return __strdup (bufs->rname.data);
}
return scratch_buffer_dupfree (rname_buf, dest - rname);
}
/* Return the canonical absolute name of file NAME. A canonical name
@ -434,12 +428,15 @@ error_nomem:
char *
__realpath (const char *name, char *resolved)
{
#ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR
#warning "GCC might issue a bogus -Wreturn-local-addr warning here."
#warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>."
#endif
struct scratch_buffer rname_buffer;
return realpath_stk (name, resolved, &rname_buffer);
struct realpath_bufs bufs;
scratch_buffer_init (&bufs.rname);
scratch_buffer_init (&bufs.extra);
scratch_buffer_init (&bufs.link);
char *result = realpath_stk (name, resolved, &bufs);
scratch_buffer_free (&bufs.link);
scratch_buffer_free (&bufs.extra);
scratch_buffer_free (&bufs.rname);
return result;
}
libc_hidden_def (__realpath)
versioned_symbol (libc, __realpath, realpath, GLIBC_2_3);

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1992-2022 Free Software Foundation, Inc.
/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.

View file

@ -1,5 +1,5 @@
/* Round towards positive infinity.
Copyright (C) 2007, 2010-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2010-2023 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,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 1991, 2004-2006, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 1991, 2004-2006, 2009-2023 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,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 2004, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2004, 2009-2023 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
@ -15,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <stdbool.h>
/* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true,
or clear the flag if VALUE is false.
Return 0 on success, or -1 on error with 'errno' set.

View file

@ -1,5 +1,5 @@
/* close replacement.
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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,5 +1,5 @@
/* Construct a full filename from a directory and a relative filename.
Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2004, 2006-2023 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,5 +1,5 @@
/* Construct a full filename from a directory and a relative filename.
Copyright (C) 2001-2004, 2007-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2004, 2007-2023 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,6 @@
/* connect.c --- wrappers for Windows connect function
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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,5 +1,5 @@
/* Copy sign into another 'double' number.
Copyright (C) 2011-2022 Free Software Foundation, Inc.
Copyright (C) 2011-2023 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,5 +1,5 @@
/* A GNU-like <dirent.h>.
Copyright (C) 2006-2022 Free Software Foundation, Inc.
Copyright (C) 2006-2023 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,6 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
Copyright (C) 2001, 2006, 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2001, 2006, 2008-2023 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,6 @@
/* dirname.c -- return all but the last element in a file name
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2022 Free Software
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation,
Copyright (C) 1998, 2001, 2003-2006, 2009-2023 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
@ -19,7 +19,6 @@
#ifndef DIRNAME_H_
# define DIRNAME_H_ 1
# include <stdbool.h>
# include <stdlib.h>
# include "filename.h"
# include "basename-lgpl.h"

View file

@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
Copyright (C) 1999, 2004-2007, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 1999, 2004-2007, 2009-2023 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,5 +1,5 @@
/* Duplicate a locale object.
Copyright (C) 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2009-2023 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,5 +1,5 @@
/* Type-safe arrays which grow dynamically.
Copyright 2021-2022 Free Software Foundation, Inc.
Copyright 2021-2023 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,5 +1,5 @@
/* Threshold at which to diagnose ELOOP. Generic version.
Copyright (C) 2012-2022 Free Software Foundation, Inc.
Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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,6 @@
/* Provide file descriptor control.
Copyright (C) 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2009-2023 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,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
Copyright (C) 2006-2022 Free Software Foundation, Inc.
Copyright (C) 2006-2023 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,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2009-2023 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,5 +1,5 @@
/* Basic filename support macros.
Copyright (C) 2001-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Locating a program in a given path.
Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2004, 2006-2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001, 2019.
This file is free software: you can redistribute it and/or modify
@ -22,7 +22,6 @@
#include "findprog.h"
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

View file

@ -1,5 +1,5 @@
/* Locating a program in PATH.
Copyright (C) 2001-2003, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2003, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This file is free software: you can redistribute it and/or modify
@ -18,8 +18,6 @@
#ifndef _FINDPROG_H
#define _FINDPROG_H
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif

View file

@ -1,6 +1,6 @@
/* Sizes of structs with flexible array members.
Copyright 2016-2022 Free Software Foundation, Inc.
Copyright 2016-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.

View file

@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This file is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
Copyright (C) 2011-2022 Free Software Foundation, Inc.
Copyright (C) 2011-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A correct <float.h>.
Copyright (C) 2007-2022 Free Software Foundation, Inc.
Copyright (C) 2007-2023 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

@ -6,7 +6,7 @@
Written by Richard W.M. Jones <rjones.at.redhat.com>
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View file

@ -1,5 +1,5 @@
/* Round towards negative infinity.
Copyright (C) 2007, 2010-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2010-2023 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,6 @@
/* Make free() preserve errno.
Copyright (C) 2003, 2006, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2003, 2006, 2009-2023 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,5 +1,5 @@
/* Split a double into fraction and mantissa.
Copyright (C) 2007-2022 Free Software Foundation, Inc.
Copyright (C) 2007-2023 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,5 +1,5 @@
/* fstat() replacement.
Copyright (C) 2011-2022 Free Software Foundation, Inc.
Copyright (C) 2011-2023 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

@ -7,7 +7,7 @@
Written by Richard W.M. Jones <rjones.at.redhat.com>
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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,5 +1,5 @@
/* An interface to read that retries after partial reads and interrupts.
Copyright (C) 2002-2003, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2009-2023 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,6 @@
/* An interface to read() that reads all it is asked to read.
Copyright (C) 2002, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2023 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,6 @@
/* An interface to read and write that retries (if necessary) until complete.
Copyright (C) 1993-1994, 1997-2006, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 1993-1994, 1997-2006, 2009-2023 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,6 @@
/* An interface to write() that writes all it is asked to write.
Copyright (C) 2002-2003, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2009-2023 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,4 +1,4 @@
/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2022 Free Software
/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2023 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.

View file

@ -1,5 +1,5 @@
/* Get address information (partial implementation).
Copyright (C) 1997, 2001-2002, 2004-2022 Free Software Foundation, Inc.
Copyright (C) 1997, 2001-2002, 2004-2023 Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>.
This file is free software: you can redistribute it and/or modify
@ -39,8 +39,6 @@
/* Get snprintf. */
#include <stdio.h>
#include <stdbool.h>
#include "gettext.h"
#define _(String) gettext (String)
#define N_(String) String

View file

@ -1,5 +1,5 @@
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* Provide a working getlogin for systems which lack it.
Copyright (C) 2010-2022 Free Software Foundation, Inc.
Copyright (C) 2010-2023 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,6 @@
/* getpeername.c --- wrappers for Windows getpeername function
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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,6 @@
/* Obtain a series of random bytes.
Copyright 2020-2022 Free Software Foundation, Inc.
Copyright 2020-2023 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
@ -23,7 +23,6 @@
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <unistd.h>
#if defined _WIN32 && ! defined __CYGWIN__

View file

@ -1,6 +1,6 @@
/* getsockname.c --- wrappers for Windows getsockname function
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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,6 @@
/* getsockopt.c --- wrappers for Windows getsockopt function
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2022 Free Software
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* hard-locale.c -- Determine whether a locale is hard.
Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2022 Free Software
Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@ -21,6 +21,7 @@
#include "hard-locale.h"
#include <locale.h>
#include <stdlib.h>
#include <string.h>
bool
@ -31,5 +32,16 @@ hard_locale (int category)
if (setlocale_null_r (category, locale, sizeof (locale)))
return false;
return !(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0);
if (!(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0))
return true;
#if defined __ANDROID__
/* On Android 5.0 or newer, it is possible to set a locale that has the same
name as the "C" locale but in fact uses UTF-8 encoding. Cf. test case 2 in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00141.html>. */
if (MB_CUR_MAX > 1)
return true;
#endif
return false;
}

View file

@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
Copyright (C) 1999, 2003-2004, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 1999, 2003-2004, 2009-2023 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
@ -18,8 +18,6 @@
#ifndef HARD_LOCALE_H_
# define HARD_LOCALE_H_ 1
# include <stdbool.h>
/* Return true if the specified CATEGORY of the current locale is hard, i.e.
different from the C or POSIX locale that has a fixed behavior.
CATEGORY must be one of the LC_* values, but not LC_ALL. */

View file

@ -1,5 +1,5 @@
/* Character set conversion.
Copyright (C) 1999-2001, 2007, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 1999-2001, 2007, 2009-2023 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,6 @@
/* A GNU-like <iconv.h>.
Copyright (C) 2007-2022 Free Software Foundation, Inc.
Copyright (C) 2007-2023 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,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2023 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,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2020-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2020-2023 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,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2020-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2020-2023 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,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2020-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2020-2023 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,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2020-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2020-2023 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,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2009, 2020-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2009, 2020-2023 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,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2019-2022 Free Software Foundation, Inc.
Copyright (C) 2019-2023 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,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2023 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,5 +1,5 @@
/* Character set conversion handler type.
Copyright (C) 2001-2007, 2009-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2007, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible.
This file is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* A type for indices and sizes.
Copyright (C) 2020-2022 Free Software Foundation, Inc.
Copyright (C) 2020-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,6 +1,6 @@
/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2008-2023 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,6 @@
/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2006, 2008-2023 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,6 @@
/* intprops-internal.h -- properties of integer types not visible to users
Copyright (C) 2001-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published

View file

@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
Copyright (C) 2001-2022 Free Software Foundation, Inc.
Copyright (C) 2001-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2006-2022 Free Software Foundation, Inc.
/* Copyright (C) 2006-2023 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.

View file

@ -1,5 +1,5 @@
/* Test for finite value (zero, subnormal, or normal, and not infinite or NaN).
Copyright (C) 2007-2022 Free Software Foundation, Inc.
Copyright (C) 2007-2023 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,5 +1,5 @@
/* Test for positive or negative infinity.
Copyright (C) 2007-2022 Free Software Foundation, Inc.
Copyright (C) 2007-2023 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,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2022 Free Software Foundation, Inc.
Copyright (C) 2007-2023 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,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2022 Free Software Foundation, Inc.
Copyright (C) 2007-2023 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,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2008-2022 Free Software Foundation, Inc.
Copyright (C) 2008-2023 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

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