summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-01-06 17:53:54 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2023-01-06 18:05:57 -0800
commit9e98ff562b4b8f2dae92bd4c64d15934c7d5877f (patch)
treef37ce6d03a710f541fbbe72b9533a05d1a63103f /lib
parent2f05f48918ecf6e59b330709b09a36f81f7b6c48 (diff)
downloademacs-9e98ff562b4b8f2dae92bd4c64d15934c7d5877f.tar.gz
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib')
-rw-r--r--lib/alloca.in.h4
-rw-r--r--lib/attribute.h2
-rw-r--r--lib/binary-io.h3
-rw-r--r--lib/c-ctype.h3
-rw-r--r--lib/c-strcasecmp.c3
-rw-r--r--lib/c-strncasecmp.c3
-rw-r--r--lib/careadlinkat.c4
-rw-r--r--lib/cloexec.c3
-rw-r--r--lib/close-stream.c3
-rw-r--r--lib/diffseq.h4
-rw-r--r--lib/dup2.c3
-rw-r--r--lib/file-has-acl.c9
-rw-r--r--lib/filemode.h4
-rw-r--r--lib/filename.h2
-rw-r--r--lib/fpending.c4
-rw-r--r--lib/fpending.h4
-rw-r--r--lib/fsusage.c4
-rw-r--r--lib/getgroups.c3
-rw-r--r--lib/getloadavg.c4
-rw-r--r--lib/gettext.h4
-rw-r--r--lib/gettime.c3
-rw-r--r--lib/gettimeofday.c3
-rw-r--r--lib/gnulib.mk.in5
-rw-r--r--lib/group-member.c4
-rw-r--r--lib/limits.in.h4
-rw-r--r--lib/malloc.c3
-rw-r--r--lib/malloc/scratch_buffer.h2
-rw-r--r--lib/malloc/scratch_buffer_grow.c2
-rw-r--r--lib/malloc/scratch_buffer_grow_preserve.c2
-rw-r--r--lib/malloc/scratch_buffer_set_array_size.c2
-rw-r--r--lib/md5-stream.c4
-rw-r--r--lib/md5.c4
-rw-r--r--lib/md5.h4
-rw-r--r--lib/memmem.c4
-rw-r--r--lib/memrchr.c4
-rw-r--r--lib/memset_explicit.c2
-rw-r--r--lib/mktime-internal.h2
-rw-r--r--lib/mktime.c2
-rw-r--r--lib/nanosleep.c3
-rw-r--r--lib/regex.c2
-rw-r--r--lib/regex.h2
-rw-r--r--lib/save-cwd.h4
-rw-r--r--lib/sha1.c3
-rw-r--r--lib/sig2str.c3
-rw-r--r--lib/stdio.in.h8
-rw-r--r--lib/stdlib.in.h3
-rw-r--r--lib/string.in.h20
-rw-r--r--lib/strtoimax.c4
-rw-r--r--lib/strtol.c4
-rw-r--r--lib/strtoll.c4
-rw-r--r--lib/time_r.c3
-rw-r--r--lib/timegm.c2
-rw-r--r--lib/verify.h16
-rw-r--r--lib/xalloc-oversized.h3
54 files changed, 112 insertions, 101 deletions
diff --git a/lib/alloca.in.h b/lib/alloca.in.h
index b9ce9ef5603..a1bb3d758dc 100644
--- a/lib/alloca.in.h
+++ b/lib/alloca.in.h
@@ -1,7 +1,7 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 1995, 1999, 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
diff --git a/lib/attribute.h b/lib/attribute.h
index 36b2978bb2c..130644d8798 100644
--- a/lib/attribute.h
+++ b/lib/attribute.h
@@ -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
diff --git a/lib/binary-io.h b/lib/binary-io.h
index dd9829aa88d..6f4db253354 100644
--- a/lib/binary-io.h
+++ b/lib/binary-io.h
@@ -1,6 +1,5 @@
/* Binary mode I/O.
- Copyright (C) 2001, 2003, 2005, 2008-2023 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
diff --git a/lib/c-ctype.h b/lib/c-ctype.h
index 9d093f7f722..35ca83d7d43 100644
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -5,8 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000-2003, 2006, 2008-2023 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
diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c
index c90c6d6a09c..8a958dc4fd9 100644
--- a/lib/c-strcasecmp.c
+++ b/lib/c-strcasecmp.c
@@ -1,6 +1,5 @@
/* c-strcasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2023 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
diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c
index bc30ce0ffc4..4ca8c5f4001 100644
--- a/lib/c-strncasecmp.c
+++ b/lib/c-strncasecmp.c
@@ -1,6 +1,5 @@
/* c-strncasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2023 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
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c
index 1d7db893731..359d497396c 100644
--- a/lib/careadlinkat.c
+++ b/lib/careadlinkat.c
@@ -1,7 +1,7 @@
/* Read symbolic links into a buffer without size limitation, relative to fd.
- Copyright (C) 2001, 2003-2004, 2007, 2009-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 2001, 2003-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
diff --git a/lib/cloexec.c b/lib/cloexec.c
index ba53d0020b1..e4cecbd2e8a 100644
--- a/lib/cloexec.c
+++ b/lib/cloexec.c
@@ -1,7 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 1991, 2004-2006, 2009-2023 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
diff --git a/lib/close-stream.c b/lib/close-stream.c
index b68b30e6ff0..ab686bac2ae 100644
--- a/lib/close-stream.c
+++ b/lib/close-stream.c
@@ -1,7 +1,6 @@
/* Close a stream, with nicer error checking than fclose's.
- Copyright (C) 1998-2002, 2004, 2006-2023 Free Software Foundation,
- Inc.
+ Copyright (C) 1998-2002, 2004, 2006-2023 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
diff --git a/lib/diffseq.h b/lib/diffseq.h
index ad3f258ab6b..dfaf4f295e8 100644
--- a/lib/diffseq.h
+++ b/lib/diffseq.h
@@ -1,7 +1,7 @@
/* Analyze differences between two vectors.
- Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2023 Free
- Software Foundation, Inc.
+ Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2023 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
diff --git a/lib/dup2.c b/lib/dup2.c
index 1597d9d1e6e..7d197ca3123 100644
--- a/lib/dup2.c
+++ b/lib/dup2.c
@@ -1,7 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2023 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
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
index d0e11e631ca..b31a2ea2523 100644
--- a/lib/file-has-acl.c
+++ b/lib/file-has-acl.c
@@ -81,9 +81,10 @@ acl_nfs4_nontrivial (uint32_t *xattr, ssize_t nbytes)
uint32_t flag = ntohl (xattr[1]);
uint32_t wholen = ntohl (xattr[3]);
xattr += 4;
- int64_t wholen4 = wholen;
- wholen4 = ((wholen4 + (BYTES_PER_NETWORK_UINT))
- & ~ (BYTES_PER_NETWORK_UINT - 1));
+ int whowords = (wholen / BYTES_PER_NETWORK_UINT
+ + (wholen % BYTES_PER_NETWORK_UINT != 0));
+ int64_t wholen4 = whowords;
+ wholen4 *= BYTES_PER_NETWORK_UINT;
/* Trivial ACLs have only ACE4_ACCESS_ALLOWED_ACE_TYPE or
ACE4_ACCESS_DENIED_ACE_TYPE. */
@@ -115,7 +116,7 @@ acl_nfs4_nontrivial (uint32_t *xattr, ssize_t nbytes)
return 1;
ace_found |= ace_found_bit;
- xattr = (uint32_t *) ((char *) xattr + wholen4);
+ xattr += whowords;
}
return 0;
diff --git a/lib/filemode.h b/lib/filemode.h
index d456cc585b3..15a8dcc3760 100644
--- a/lib/filemode.h
+++ b/lib/filemode.h
@@ -1,7 +1,7 @@
/* Make a string describing file modes.
- Copyright (C) 1998-1999, 2003, 2006, 2009-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 1998-1999, 2003, 2006, 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 General Public License as published by
diff --git a/lib/filename.h b/lib/filename.h
index a2400a9dfe3..ab77ca2df91 100644
--- a/lib/filename.h
+++ b/lib/filename.h
@@ -1,5 +1,5 @@
/* Basic filename support macros.
- Copyright (C) 2001-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2022 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
diff --git a/lib/fpending.c b/lib/fpending.c
index df3cd85f3a6..afa840b8512 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -1,6 +1,6 @@
/* fpending.c -- return the number of pending output bytes on a stream
- Copyright (C) 2000, 2004, 2006-2007, 2009-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 2000, 2004, 2006-2007, 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 General Public License as published by
diff --git a/lib/fpending.h b/lib/fpending.h
index fe310384f7e..5e860db6810 100644
--- a/lib/fpending.h
+++ b/lib/fpending.h
@@ -1,7 +1,7 @@
/* Declare __fpending.
- Copyright (C) 2000, 2003, 2005-2006, 2009-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 2000, 2003, 2005-2006, 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 General Public License as published by
diff --git a/lib/fsusage.c b/lib/fsusage.c
index 2be120a06de..f6f4b1c35fd 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -1,7 +1,7 @@
/* fsusage.c -- return space usage of mounted file systems
- Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2023 Free
- Software Foundation, Inc.
+ Copyright (C) 1991-1992, 1996, 1998-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
diff --git a/lib/getgroups.c b/lib/getgroups.c
index 6a2bda8d71e..93829d3b15e 100644
--- a/lib/getgroups.c
+++ b/lib/getgroups.c
@@ -1,7 +1,6 @@
/* provide consistent interface to getgroups for systems that don't allow N==0
- Copyright (C) 1996, 1999, 2003, 2006-2023 Free Software Foundation,
- Inc.
+ Copyright (C) 1996, 1999, 2003, 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
diff --git a/lib/getloadavg.c b/lib/getloadavg.c
index 37fcea0a76b..59b53e79980 100644
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -1,7 +1,7 @@
/* Get the system load averages.
- Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2023 Free
- Software Foundation, Inc.
+ Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2023 Free Software
+ Foundation, Inc.
NOTE: The canonical source of this file is maintained with gnulib.
Bugs can be reported to bug-gnulib@gnu.org.
diff --git a/lib/gettext.h b/lib/gettext.h
index 582886f9f51..d0462c47e17 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -1,6 +1,6 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2023 Free
- Software Foundation, Inc.
+ 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
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/gettime.c b/lib/gettime.c
index cfba830478e..f86cc4efbff 100644
--- a/lib/gettime.c
+++ b/lib/gettime.c
@@ -1,7 +1,6 @@
/* gettime -- get the system clock
- Copyright (C) 2002, 2004-2007, 2009-2023 Free Software Foundation,
- Inc.
+ Copyright (C) 2002, 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
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index 7207c851272..d896ec132b9 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -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-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-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
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 9e2eaf51381..0b4e0458a3c 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -240,6 +240,7 @@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EXECINFO_H = @EXECINFO_H@
EXEEXT = @EXEEXT@
+FILE_HAS_ACL_LIB = @FILE_HAS_ACL_LIB@
FIND_DELETE = @FIND_DELETE@
FIRSTFILE_OBJ = @FIRSTFILE_OBJ@
FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
@@ -675,6 +676,7 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_GETW = @HAVE_DECL_GETW@
HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
@@ -683,6 +685,7 @@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
HAVE_DECL_POSIX_SPAWN_SETSID = @HAVE_DECL_POSIX_SPAWN_SETSID@
+HAVE_DECL_PUTW = @HAVE_DECL_PUTW@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
@@ -3104,7 +3107,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' \
diff --git a/lib/group-member.c b/lib/group-member.c
index 6e3f640dcf0..96a09f94a8f 100644
--- a/lib/group-member.c
+++ b/lib/group-member.c
@@ -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-2023 Free
- Software Foundation, Inc.
+ Copyright (C) 1994, 1997-1998, 2003, 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
diff --git a/lib/limits.in.h b/lib/limits.in.h
index ae46a5aa25f..eaeac472299 100644
--- a/lib/limits.in.h
+++ b/lib/limits.in.h
@@ -99,7 +99,7 @@
# endif
#endif
-/* Macros specified by C2x and by ISO/IEC TS 18661-1:2014. */
+/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */
#if (! defined ULLONG_WIDTH \
&& (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \
@@ -117,7 +117,7 @@
# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
#endif
-/* Macros specified by C2x. */
+/* Macros specified by C23. */
#if (! defined BOOL_WIDTH \
&& (defined _GNU_SOURCE \
diff --git a/lib/malloc.c b/lib/malloc.c
index 92f8c841cd7..3ade35cb63f 100644
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -1,7 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-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
diff --git a/lib/malloc/scratch_buffer.h b/lib/malloc/scratch_buffer.h
index 33fd2b29cd5..a9bdcadec21 100644
--- a/lib/malloc/scratch_buffer.h
+++ b/lib/malloc/scratch_buffer.h
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2023 Free Software Foundation, Inc.
+ Copyright (C) 2015-2022 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
diff --git a/lib/malloc/scratch_buffer_grow.c b/lib/malloc/scratch_buffer_grow.c
index a5e8f2f7230..9a5e4dbb1eb 100644
--- a/lib/malloc/scratch_buffer_grow.c
+++ b/lib/malloc/scratch_buffer_grow.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2023 Free Software Foundation, Inc.
+ Copyright (C) 2015-2022 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
diff --git a/lib/malloc/scratch_buffer_grow_preserve.c b/lib/malloc/scratch_buffer_grow_preserve.c
index c0b5d87b7e4..3fe5a0720ec 100644
--- a/lib/malloc/scratch_buffer_grow_preserve.c
+++ b/lib/malloc/scratch_buffer_grow_preserve.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2023 Free Software Foundation, Inc.
+ Copyright (C) 2015-2022 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
diff --git a/lib/malloc/scratch_buffer_set_array_size.c b/lib/malloc/scratch_buffer_set_array_size.c
index 24c39350ade..89c37a950e9 100644
--- a/lib/malloc/scratch_buffer_set_array_size.c
+++ b/lib/malloc/scratch_buffer_set_array_size.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2023 Free Software Foundation, Inc.
+ Copyright (C) 2015-2022 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
diff --git a/lib/md5-stream.c b/lib/md5-stream.c
index ab48fe3261a..ba76792cbbe 100644
--- a/lib/md5-stream.c
+++ b/lib/md5-stream.c
@@ -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-2023 Free
- Software Foundation, Inc.
+ Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2023 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
diff --git a/lib/md5.c b/lib/md5.c
index b1e139339f4..4a6accf28ff 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -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-2023 Free
- Software Foundation, Inc.
+ Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2023 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
diff --git a/lib/md5.h b/lib/md5.h
index 3b0b4ff730f..f34e7cb8dfa 100644
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -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-2023 Free
- Software Foundation, Inc.
+ Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2023 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
diff --git a/lib/memmem.c b/lib/memmem.c
index 665815efb1a..c0b48c1b25d 100644
--- a/lib/memmem.c
+++ b/lib/memmem.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2023 Free
- Software Foundation, Inc.
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2023 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
diff --git a/lib/memrchr.c b/lib/memrchr.c
index a34fc71f7da..c5b1fe8b2e3 100644
--- a/lib/memrchr.c
+++ b/lib/memrchr.c
@@ -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-2023 Free
- Software Foundation, Inc.
+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2023 Free Software
+ Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
with help from Dan Sahlin (dan@sics.se) and
diff --git a/lib/memset_explicit.c b/lib/memset_explicit.c
index eabeb3ec2b8..6d21a5e8797 100644
--- a/lib/memset_explicit.c
+++ b/lib/memset_explicit.c
@@ -1,5 +1,5 @@
/* Erase sensitive data from memory.
- Copyright 2022 Free Software Foundation, Inc.
+ Copyright 2022-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
diff --git a/lib/mktime-internal.h b/lib/mktime-internal.h
index 709c36bdf56..170764eabc8 100644
--- a/lib/mktime-internal.h
+++ b/lib/mktime-internal.h
@@ -1,5 +1,5 @@
/* Internals of mktime and related functions
- Copyright 2016-2023 Free Software Foundation, Inc.
+ Copyright 2016-2022 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Eggert <eggert@cs.ucla.edu>.
diff --git a/lib/mktime.c b/lib/mktime.c
index 94a4320e6ca..7dc9d67ef9d 100644
--- a/lib/mktime.c
+++ b/lib/mktime.c
@@ -1,5 +1,5 @@
/* Convert a 'struct tm' to a time_t value.
- Copyright (C) 1993-2023 Free Software Foundation, Inc.
+ Copyright (C) 1993-2022 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Eggert <eggert@twinsun.com>.
diff --git a/lib/nanosleep.c b/lib/nanosleep.c
index 6383115c0f1..3f295f49b5d 100644
--- a/lib/nanosleep.c
+++ b/lib/nanosleep.c
@@ -1,7 +1,6 @@
/* Provide a replacement for the POSIX nanosleep function.
- Copyright (C) 1999-2000, 2002, 2004-2023 Free Software Foundation,
- Inc.
+ Copyright (C) 1999-2000, 2002, 2004-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
diff --git a/lib/regex.c b/lib/regex.c
index 3beb0deb987..ff1176782e4 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002-2022 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/lib/regex.h b/lib/regex.h
index 9ef0252ffff..a7e0bd02757 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-2023 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-2022 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
diff --git a/lib/save-cwd.h b/lib/save-cwd.h
index f26319389c2..d089b0e2145 100644
--- a/lib/save-cwd.h
+++ b/lib/save-cwd.h
@@ -1,7 +1,7 @@
/* Save and restore current working directory.
- Copyright (C) 1995, 1997-1998, 2003, 2009-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 1995, 1997-1998, 2003, 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 General Public License as published by
diff --git a/lib/sha1.c b/lib/sha1.c
index 3f6d86a285c..80f0b7a3314 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -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-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 2000-2001, 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
diff --git a/lib/sig2str.c b/lib/sig2str.c
index 4f68cb7ca8a..c5219caaaed 100644
--- a/lib/sig2str.c
+++ b/lib/sig2str.c
@@ -1,7 +1,6 @@
/* sig2str.c -- convert between signal names and numbers
- Copyright (C) 2002, 2004, 2006, 2009-2023 Free Software Foundation,
- Inc.
+ Copyright (C) 2002, 2004, 2006, 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 General Public License as published by
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index 59cbea3d47d..8b5ef4bd2dd 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -951,9 +951,13 @@ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
# endif
_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream));
# else
+# if @HAVE_DECL_GETW@
_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream));
+# endif
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getw);
+# endif
#endif
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
@@ -1190,9 +1194,13 @@ _GL_CXXALIASWARN (puts);
# endif
_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream));
# else
+# if @HAVE_DECL_PUTW@
_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream));
+# endif
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (putw);
+# endif
#endif
#if @GNULIB_REMOVE@
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 4c8aad76124..b79e5f70965 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -1,7 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation,
- Inc.
+ Copyright (C) 1995, 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
diff --git a/lib/string.in.h b/lib/string.in.h
index 1e27deed982..b227a178873 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -59,10 +59,11 @@
# include <unistd.h>
#endif
-/* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>. */
+/* AIX 7.2 and Android 13 declare ffsl and ffsll in <strings.h>, not in
+ <string.h>. */
/* But in any case avoid namespace pollution on glibc systems. */
#if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \
- && defined _AIX) \
+ && (defined _AIX || defined __ANDROID__)) \
&& ! defined __GLIBC__
# include <strings.h>
#endif
@@ -82,7 +83,14 @@
can be freed via 'free'; it can be used only after declaring 'free'. */
/* Applies to: functions. Cannot be used on inline functions. */
#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
#endif
/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
@@ -336,7 +344,7 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr,
|| defined __clang__)
_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ());
_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ());
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (memrchr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -491,7 +499,7 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul,
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ());
_GL_CXXALIASWARN1 (strchrnul, char const *,
(char const *__s, int __c_in) throw ());
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strchrnul);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -856,7 +864,7 @@ _GL_CXXALIASWARN1 (strcasestr, char *,
(char *haystack, const char *needle) throw ());
_GL_CXXALIASWARN1 (strcasestr, const char *,
(const char *haystack, const char *needle) throw ());
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strcasestr);
# endif
#elif defined GNULIB_POSIXCHECK
diff --git a/lib/strtoimax.c b/lib/strtoimax.c
index d8d74e8c699..f7977e28e64 100644
--- a/lib/strtoimax.c
+++ b/lib/strtoimax.c
@@ -1,7 +1,7 @@
/* Convert string representation of a number into an intmax_t value.
- Copyright (C) 1999, 2001-2004, 2006, 2009-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 1999, 2001-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
diff --git a/lib/strtol.c b/lib/strtol.c
index 6bc1f061877..d11269b2622 100644
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -1,7 +1,7 @@
/* Convert string representation of a number into an integer value.
- Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2023 Free
- Software Foundation, Inc.
+ Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2023 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.
diff --git a/lib/strtoll.c b/lib/strtoll.c
index 919b453984c..9fdfa19b220 100644
--- a/lib/strtoll.c
+++ b/lib/strtoll.c
@@ -1,6 +1,6 @@
/* Function to parse a 'long long int' from text.
- Copyright (C) 1995-1997, 1999, 2001, 2009-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 1995-1997, 1999, 2001, 2009-2023 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
diff --git a/lib/time_r.c b/lib/time_r.c
index c8143a6900a..97be4fd0544 100644
--- a/lib/time_r.c
+++ b/lib/time_r.c
@@ -1,7 +1,6 @@
/* Reentrant time functions like localtime_r.
- Copyright (C) 2003, 2006-2007, 2010-2023 Free Software Foundation,
- Inc.
+ Copyright (C) 2003, 2006-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
diff --git a/lib/timegm.c b/lib/timegm.c
index b47025a0545..a1b19efc392 100644
--- a/lib/timegm.c
+++ b/lib/timegm.c
@@ -1,6 +1,6 @@
/* Convert UTC calendar time to simple time. Like mktime but assumes UTC.
- Copyright (C) 1994-2023 Free Software Foundation, Inc.
+ Copyright (C) 1994-2022 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
diff --git a/lib/verify.h b/lib/verify.h
index ff8438c9269..17d6e78c816 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -223,8 +223,15 @@ template <int w>
/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */
#ifdef _GL_STATIC_ASSERT_H
# if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
-# define _Static_assert(R, ...) \
- _GL_VERIFY ((R), "static assertion failed", -)
+# if !defined _MSC_VER || defined __clang__
+# define _Static_assert(...) \
+ _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
+# else
+ /* Work around MSVC preprocessor incompatibility with ISO C; see
+ <https://stackoverflow.com/questions/5134523/>. */
+# define _Static_assert(R, ...) \
+ _GL_VERIFY ((R), "static assertion failed", -)
+# endif
# endif
# if (!defined static_assert \
&& __STDC_VERSION__ < 202311 \
@@ -235,9 +242,8 @@ template <int w>
/* MSVC 14 in C++ mode supports the two-arguments static_assert but not
the one-argument static_assert, and it does not support _Static_assert.
We have to play preprocessor tricks to distinguish the two cases.
- Since the MSVC preprocessor is not ISO C compliant (cf.
- <https://stackoverflow.com/questions/5134523/>), the solution is specific
- to MSVC. */
+ Since the MSVC preprocessor is not ISO C compliant (see above),.
+ the solution is specific to MSVC. */
# define _GL_EXPAND(x) x
# define _GL_SA1(a1) static_assert ((a1), "static assertion failed")
# define _GL_SA2 static_assert
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index 05ef7028137..5dbdfb5506a 100644
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -1,7 +1,6 @@
/* xalloc-oversized.h -- memory allocation size checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2023 Free Software
- Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-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