diff options
| author | Paul Eggert | 2020-01-01 03:11:22 +0000 |
|---|---|---|
| committer | Paul Eggert | 2019-12-31 19:11:56 -0800 |
| commit | 64d1b9fd8a97d355d7fe23025d82bebe52c1af1c (patch) | |
| tree | b3375e41ebc8b83c9d7742a064820a32ef61ab57 /lib | |
| parent | c6fb86b40bebf597fccbe4eba58ceea83bd9700f (diff) | |
| download | emacs-64d1b9fd8a97d355d7fe23025d82bebe52c1af1c.tar.gz emacs-64d1b9fd8a97d355d7fe23025d82bebe52c1af1c.zip | |
Update from gnulib
This incorporates:
2019-12-23 mktime, nstrftime: tweak division performance
2019-12-22 count-leading-zeros: assume 'long long'
2019-12-22 count-one-bits: assume 'long long'
2019-12-22 count-trailing-zeros: assume 'long long'
2019-12-12 inttypes-incomplete: assume 'long long'
2019-12-22 malloca: assume 'long long'
2019-12-22 stdint: assume 'long long'
2019-12-22 strtoll, strtoimax, strtoumax: assume 'long long'
2019-12-22 prefer lib_SOURCES to unconditional AC_LIBOBJ
2019-12-19 nstrftime: avoid a shadowing warning
2019-12-18 improve port of AC_C_RESTRICT to Oracle C++
2019-12-12 stdalign: port to xlclang 16.01
2019-12-11 stddef, unistd: fix compilation error in C++ mode on MSVC
2019-12-08 fix compilation errors in C++ mode on Haiku
2019-12-08 fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
2019-12-08 fix compilation error in C++ mode on OpenBSD
* build-aux/config.guess, doc/misc/texinfo.tex:
* lib/count-leading-zeros.h, lib/count-one-bits.h:
* lib/count-trailing-zeros.h, lib/inttypes.in.h, lib/malloca.h:
* lib/mktime.c, lib/nstrftime.c, lib/signal.in.h, lib/stdalign.in.h:
* lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/strtoimax.c, lib/unistd.in.h, m4/gnulib-common.m4:
* m4/inttypes.m4, m4/largefile.m4, m4/malloca.m4, m4/strtoimax.m4:
* m4/strtoll.m4:
Copy from Gnulib. Also, change copyright notices in some other
Gnulib-copied files to exactly match Gnulib, as Gnulib updated
them in a trivially different way.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
Diffstat (limited to 'lib')
51 files changed, 135 insertions, 153 deletions
diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 228f9a0a29b..c7187e66ae3 100644 --- a/lib/alloca.in.h +++ b/lib/alloca.in.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Memory allocation on the stack. | 1 | /* Memory allocation on the stack. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995, 1999, 2001-2004, 2006-2020 Free Software | 3 | Copyright (C) 1995, 1999, 2001-2004, 2006-2020 Free Software Foundation, |
| 4 | Foundation, Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
| 7 | under the terms of the GNU General Public License as published | 7 | under the terms of the GNU General Public License as published |
diff --git a/lib/binary-io.h b/lib/binary-io.h index 64223f16fc2..477b4bf4dd3 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | /* Binary mode I/O. | 1 | /* Binary mode I/O. |
| 2 | Copyright (C) 2001, 2003, 2005, 2008-2020 Free Software Foundation, | 2 | Copyright (C) 2001, 2003, 2005, 2008-2020 Free Software Foundation, Inc. |
| 3 | Inc. | ||
| 4 | 3 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/c-ctype.h b/lib/c-ctype.h index 42891bb1683..fbd11b34508 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h | |||
| @@ -5,8 +5,7 @@ | |||
| 5 | <ctype.h> functions' behaviour depends on the current locale set via | 5 | <ctype.h> functions' behaviour depends on the current locale set via |
| 6 | setlocale. | 6 | setlocale. |
| 7 | 7 | ||
| 8 | Copyright (C) 2000-2003, 2006, 2008-2020 Free Software Foundation, | 8 | Copyright (C) 2000-2003, 2006, 2008-2020 Free Software Foundation, Inc. |
| 9 | Inc. | ||
| 10 | 9 | ||
| 11 | This program is free software; you can redistribute it and/or modify | 10 | This program is free software; you can redistribute it and/or modify |
| 12 | it under the terms of the GNU General Public License as published by | 11 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c index f660bba73b5..951220f3e29 100644 --- a/lib/c-strcasecmp.c +++ b/lib/c-strcasecmp.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | /* c-strcasecmp.c -- case insensitive string comparator in C locale | 1 | /* c-strcasecmp.c -- case insensitive string comparator in C locale |
| 2 | Copyright (C) 1998-1999, 2005-2006, 2009-2020 Free Software | 2 | Copyright (C) 1998-1999, 2005-2006, 2009-2020 Free Software Foundation, Inc. |
| 3 | Foundation, Inc. | ||
| 4 | 3 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c index 89df6915840..9ad49191b7f 100644 --- a/lib/c-strncasecmp.c +++ b/lib/c-strncasecmp.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | /* c-strncasecmp.c -- case insensitive string comparator in C locale | 1 | /* c-strncasecmp.c -- case insensitive string comparator in C locale |
| 2 | Copyright (C) 1998-1999, 2005-2006, 2009-2020 Free Software | 2 | Copyright (C) 1998-1999, 2005-2006, 2009-2020 Free Software Foundation, Inc. |
| 3 | Foundation, Inc. | ||
| 4 | 3 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index 197ce8de77f..1effdb78451 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Read symbolic links into a buffer without size limitation, relative to fd. | 1 | /* Read symbolic links into a buffer without size limitation, relative to fd. |
| 2 | 2 | ||
| 3 | Copyright (C) 2001, 2003-2004, 2007, 2009-2020 Free Software | 3 | Copyright (C) 2001, 2003-2004, 2007, 2009-2020 Free Software Foundation, |
| 4 | Foundation, Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/cloexec.c b/lib/cloexec.c index 269e6f25f3b..510be3d57ec 100644 --- a/lib/cloexec.c +++ b/lib/cloexec.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag | 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag |
| 2 | 2 | ||
| 3 | Copyright (C) 1991, 2004-2006, 2009-2020 Free Software Foundation, | 3 | Copyright (C) 1991, 2004-2006, 2009-2020 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/close-stream.c b/lib/close-stream.c index b1d04a53059..04bc8009a57 100644 --- a/lib/close-stream.c +++ b/lib/close-stream.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* Close a stream, with nicer error checking than fclose's. | 1 | /* Close a stream, with nicer error checking than fclose's. |
| 2 | 2 | ||
| 3 | Copyright (C) 1998-2002, 2004, 2006-2020 Free Software Foundation, | 3 | Copyright (C) 1998-2002, 2004, 2006-2020 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h index 2b65cc9eda9..b548754e181 100644 --- a/lib/count-leading-zeros.h +++ b/lib/count-leading-zeros.h | |||
| @@ -100,7 +100,6 @@ count_leading_zeros_l (unsigned long int x) | |||
| 100 | COUNT_LEADING_ZEROS (__builtin_clzl, _BitScanReverse, unsigned long int); | 100 | COUNT_LEADING_ZEROS (__builtin_clzl, _BitScanReverse, unsigned long int); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | #if HAVE_UNSIGNED_LONG_LONG_INT | ||
| 104 | /* Compute and return the number of leading zeros in X. */ | 103 | /* Compute and return the number of leading zeros in X. */ |
| 105 | COUNT_LEADING_ZEROS_INLINE int | 104 | COUNT_LEADING_ZEROS_INLINE int |
| 106 | count_leading_zeros_ll (unsigned long long int x) | 105 | count_leading_zeros_ll (unsigned long long int x) |
| @@ -108,7 +107,6 @@ count_leading_zeros_ll (unsigned long long int x) | |||
| 108 | COUNT_LEADING_ZEROS (__builtin_clzll, _BitScanReverse64, | 107 | COUNT_LEADING_ZEROS (__builtin_clzll, _BitScanReverse64, |
| 109 | unsigned long long int); | 108 | unsigned long long int); |
| 110 | } | 109 | } |
| 111 | #endif | ||
| 112 | 110 | ||
| 113 | _GL_INLINE_HEADER_END | 111 | _GL_INLINE_HEADER_END |
| 114 | 112 | ||
diff --git a/lib/count-one-bits.h b/lib/count-one-bits.h index 040776f7466..78770e4240d 100644 --- a/lib/count-one-bits.h +++ b/lib/count-one-bits.h | |||
| @@ -122,14 +122,12 @@ count_one_bits_l (unsigned long int x) | |||
| 122 | COUNT_ONE_BITS (__builtin_popcountl, __popcnt, unsigned long int); | 122 | COUNT_ONE_BITS (__builtin_popcountl, __popcnt, unsigned long int); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | #if HAVE_UNSIGNED_LONG_LONG_INT | ||
| 126 | /* Compute and return the number of 1-bits set in X. */ | 125 | /* Compute and return the number of 1-bits set in X. */ |
| 127 | COUNT_ONE_BITS_INLINE int | 126 | COUNT_ONE_BITS_INLINE int |
| 128 | count_one_bits_ll (unsigned long long int x) | 127 | count_one_bits_ll (unsigned long long int x) |
| 129 | { | 128 | { |
| 130 | COUNT_ONE_BITS (__builtin_popcountll, __popcnt64, unsigned long long int); | 129 | COUNT_ONE_BITS (__builtin_popcountll, __popcnt64, unsigned long long int); |
| 131 | } | 130 | } |
| 132 | #endif | ||
| 133 | 131 | ||
| 134 | _GL_INLINE_HEADER_END | 132 | _GL_INLINE_HEADER_END |
| 135 | 133 | ||
diff --git a/lib/count-trailing-zeros.h b/lib/count-trailing-zeros.h index 15e85708d18..2169f626251 100644 --- a/lib/count-trailing-zeros.h +++ b/lib/count-trailing-zeros.h | |||
| @@ -92,7 +92,6 @@ count_trailing_zeros_l (unsigned long int x) | |||
| 92 | COUNT_TRAILING_ZEROS (__builtin_ctzl, _BitScanForward, unsigned long int); | 92 | COUNT_TRAILING_ZEROS (__builtin_ctzl, _BitScanForward, unsigned long int); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | #if HAVE_UNSIGNED_LONG_LONG_INT | ||
| 96 | /* Compute and return the number of trailing zeros in X. */ | 95 | /* Compute and return the number of trailing zeros in X. */ |
| 97 | COUNT_TRAILING_ZEROS_INLINE int | 96 | COUNT_TRAILING_ZEROS_INLINE int |
| 98 | count_trailing_zeros_ll (unsigned long long int x) | 97 | count_trailing_zeros_ll (unsigned long long int x) |
| @@ -100,7 +99,6 @@ count_trailing_zeros_ll (unsigned long long int x) | |||
| 100 | COUNT_TRAILING_ZEROS (__builtin_ctzll, _BitScanForward64, | 99 | COUNT_TRAILING_ZEROS (__builtin_ctzll, _BitScanForward64, |
| 101 | unsigned long long int); | 100 | unsigned long long int); |
| 102 | } | 101 | } |
| 103 | #endif | ||
| 104 | 102 | ||
| 105 | _GL_INLINE_HEADER_END | 103 | _GL_INLINE_HEADER_END |
| 106 | 104 | ||
diff --git a/lib/diffseq.h b/lib/diffseq.h index 16e06053b43..c89363ac9ee 100644 --- a/lib/diffseq.h +++ b/lib/diffseq.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Analyze differences between two vectors. | 1 | /* Analyze differences between two vectors. |
| 2 | 2 | ||
| 3 | Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2020 Free | 3 | Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2020 Free Software |
| 4 | Software Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/dosname.h b/lib/dosname.h index 3bb08a5eeec..57829600948 100644 --- a/lib/dosname.h +++ b/lib/dosname.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* File names on MS-DOS/Windows systems. | 1 | /* File names on MS-DOS/Windows systems. |
| 2 | 2 | ||
| 3 | Copyright (C) 2000-2001, 2004-2006, 2009-2020 Free Software | 3 | Copyright (C) 2000-2001, 2004-2006, 2009-2020 Free Software Foundation, Inc. |
| 4 | Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/dup2.c b/lib/dup2.c index b5c3a00c740..88ef2591313 100644 --- a/lib/dup2.c +++ b/lib/dup2.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* Duplicate an open file descriptor to a specified file descriptor. | 1 | /* Duplicate an open file descriptor to a specified file descriptor. |
| 2 | 2 | ||
| 3 | Copyright (C) 1999, 2004-2007, 2009-2020 Free Software Foundation, | 3 | Copyright (C) 1999, 2004-2007, 2009-2020 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/filemode.h b/lib/filemode.h index 8b8464f220a..f84a491625c 100644 --- a/lib/filemode.h +++ b/lib/filemode.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Make a string describing file modes. | 1 | /* Make a string describing file modes. |
| 2 | 2 | ||
| 3 | Copyright (C) 1998-1999, 2003, 2006, 2009-2020 Free Software | 3 | Copyright (C) 1998-1999, 2003, 2006, 2009-2020 Free Software Foundation, |
| 4 | Foundation, Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/fpending.c b/lib/fpending.c index 4db32eafd6a..802ebcba654 100644 --- a/lib/fpending.c +++ b/lib/fpending.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* fpending.c -- return the number of pending output bytes on a stream | 1 | /* fpending.c -- return the number of pending output bytes on a stream |
| 2 | Copyright (C) 2000, 2004, 2006-2007, 2009-2020 Free Software | 2 | Copyright (C) 2000, 2004, 2006-2007, 2009-2020 Free Software Foundation, |
| 3 | Foundation, Inc. | 3 | Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/fpending.h b/lib/fpending.h index 52639379975..a8b8859726d 100644 --- a/lib/fpending.h +++ b/lib/fpending.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Declare __fpending. | 1 | /* Declare __fpending. |
| 2 | 2 | ||
| 3 | Copyright (C) 2000, 2003, 2005-2006, 2009-2020 Free Software | 3 | Copyright (C) 2000, 2003, 2005-2006, 2009-2020 Free Software Foundation, |
| 4 | Foundation, Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/fsusage.c b/lib/fsusage.c index c0ee4533f9a..81960152d41 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* fsusage.c -- return space usage of mounted file systems | 1 | /* fsusage.c -- return space usage of mounted file systems |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2020 Free | 3 | Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2020 Free Software |
| 4 | Software Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/getgroups.c b/lib/getgroups.c index b1ec68dadf9..4396b4d64b7 100644 --- a/lib/getgroups.c +++ b/lib/getgroups.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* provide consistent interface to getgroups for systems that don't allow N==0 | 1 | /* provide consistent interface to getgroups for systems that don't allow N==0 |
| 2 | 2 | ||
| 3 | Copyright (C) 1996, 1999, 2003, 2006-2020 Free Software Foundation, | 3 | Copyright (C) 1996, 1999, 2003, 2006-2020 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/getloadavg.c b/lib/getloadavg.c index 507017339cc..ebb6f5d5dba 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Get the system load averages. | 1 | /* Get the system load averages. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2020 Free | 3 | Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2020 Free Software |
| 4 | Software Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | NOTE: The canonical source of this file is maintained with gnulib. | 6 | NOTE: The canonical source of this file is maintained with gnulib. |
| 7 | Bugs can be reported to bug-gnulib@gnu.org. | 7 | Bugs can be reported to bug-gnulib@gnu.org. |
diff --git a/lib/gettext.h b/lib/gettext.h index 4c6b5efcc3f..0bd1e13348a 100644 --- a/lib/gettext.h +++ b/lib/gettext.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Convenience header for conditional use of GNU <libintl.h>. | 1 | /* Convenience header for conditional use of GNU <libintl.h>. |
| 2 | Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2020 Free | 2 | Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2020 Free Software |
| 3 | Software Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/gettime.c b/lib/gettime.c index f212a238a88..f5b8ca53b5f 100644 --- a/lib/gettime.c +++ b/lib/gettime.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* gettime -- get the system clock | 1 | /* gettime -- get the system clock |
| 2 | 2 | ||
| 3 | Copyright (C) 2002, 2004-2007, 2009-2020 Free Software Foundation, | 3 | Copyright (C) 2002, 2004-2007, 2009-2020 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index b5e2c300305..b63f8f29292 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* Provide gettimeofday for systems that don't have it or for which it's broken. | 1 | /* Provide gettimeofday for systems that don't have it or for which it's broken. |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software | 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc. |
| 4 | Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 5adea10c18e..951e5b1a652 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -580,7 +580,6 @@ HAVE_LCHMOD = @HAVE_LCHMOD@ | |||
| 580 | HAVE_LCHOWN = @HAVE_LCHOWN@ | 580 | HAVE_LCHOWN = @HAVE_LCHOWN@ |
| 581 | HAVE_LINK = @HAVE_LINK@ | 581 | HAVE_LINK = @HAVE_LINK@ |
| 582 | HAVE_LINKAT = @HAVE_LINKAT@ | 582 | HAVE_LINKAT = @HAVE_LINKAT@ |
| 583 | HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ | ||
| 584 | HAVE_LSTAT = @HAVE_LSTAT@ | 583 | HAVE_LSTAT = @HAVE_LSTAT@ |
| 585 | HAVE_MAKEINFO = @HAVE_MAKEINFO@ | 584 | HAVE_MAKEINFO = @HAVE_MAKEINFO@ |
| 586 | HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ | 585 | HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ |
| @@ -676,7 +675,6 @@ HAVE_TZSET = @HAVE_TZSET@ | |||
| 676 | HAVE_UNISTD_H = @HAVE_UNISTD_H@ | 675 | HAVE_UNISTD_H = @HAVE_UNISTD_H@ |
| 677 | HAVE_UNLINKAT = @HAVE_UNLINKAT@ | 676 | HAVE_UNLINKAT = @HAVE_UNLINKAT@ |
| 678 | HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ | 677 | HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ |
| 679 | HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ | ||
| 680 | HAVE_USLEEP = @HAVE_USLEEP@ | 678 | HAVE_USLEEP = @HAVE_USLEEP@ |
| 681 | HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ | 679 | HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ |
| 682 | HAVE_VASPRINTF = @HAVE_VASPRINTF@ | 680 | HAVE_VASPRINTF = @HAVE_VASPRINTF@ |
| @@ -768,6 +766,7 @@ MAKEINFO = @MAKEINFO@ | |||
| 768 | MAKE_PROG = @MAKE_PROG@ | 766 | MAKE_PROG = @MAKE_PROG@ |
| 769 | MKDIR_P = @MKDIR_P@ | 767 | MKDIR_P = @MKDIR_P@ |
| 770 | MODULES_OBJ = @MODULES_OBJ@ | 768 | MODULES_OBJ = @MODULES_OBJ@ |
| 769 | MODULES_SECONDARY_SUFFIX = @MODULES_SECONDARY_SUFFIX@ | ||
| 771 | MODULES_SUFFIX = @MODULES_SUFFIX@ | 770 | MODULES_SUFFIX = @MODULES_SUFFIX@ |
| 772 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ | 771 | NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ |
| 773 | NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ | 772 | NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ |
| @@ -1198,12 +1197,9 @@ endif | |||
| 1198 | ifeq (,$(OMIT_GNULIB_MODULE_at-internal)) | 1197 | ifeq (,$(OMIT_GNULIB_MODULE_at-internal)) |
| 1199 | 1198 | ||
| 1200 | ifneq (,$(gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b)) | 1199 | ifneq (,$(gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b)) |
| 1200 | libgnu_a_SOURCES += openat-priv.h openat-proc.c | ||
| 1201 | 1201 | ||
| 1202 | endif | 1202 | endif |
| 1203 | EXTRA_DIST += openat-priv.h openat-proc.c | ||
| 1204 | |||
| 1205 | EXTRA_libgnu_a_SOURCES += openat-proc.c | ||
| 1206 | |||
| 1207 | endif | 1203 | endif |
| 1208 | ## end gnulib module at-internal | 1204 | ## end gnulib module at-internal |
| 1209 | 1205 | ||
| @@ -1910,8 +1906,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U | |||
| 1910 | -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ | 1906 | -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ |
| 1911 | -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ | 1907 | -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ |
| 1912 | -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ | 1908 | -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ |
| 1913 | -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ | ||
| 1914 | -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ | ||
| 1915 | -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ | 1909 | -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ |
| 1916 | -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ | 1910 | -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ |
| 1917 | -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ | 1911 | -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ |
| @@ -2432,8 +2426,6 @@ stdint.h: stdint.in.h $(top_builddir)/config.status | |||
| 2432 | -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ | 2426 | -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ |
| 2433 | -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ | 2427 | -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ |
| 2434 | -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ | 2428 | -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ |
| 2435 | -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ | ||
| 2436 | -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ | ||
| 2437 | -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ | 2429 | -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ |
| 2438 | -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ | 2430 | -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ |
| 2439 | -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ | 2431 | -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ |
diff --git a/lib/group-member.c b/lib/group-member.c index 7aa8a453615..6a6fc5605ef 100644 --- a/lib/group-member.c +++ b/lib/group-member.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* group-member.c -- determine whether group id is in calling user's group list | 1 | /* group-member.c -- determine whether group id is in calling user's group list |
| 2 | 2 | ||
| 3 | Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2020 Free | 3 | Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2020 Free Software |
| 4 | Software Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index da84aff0440..5184e266f27 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h | |||
| @@ -189,7 +189,7 @@ | |||
| 189 | # define _PRI64_PREFIX "l" | 189 | # define _PRI64_PREFIX "l" |
| 190 | # elif defined _MSC_VER || defined __MINGW32__ | 190 | # elif defined _MSC_VER || defined __MINGW32__ |
| 191 | # define _PRI64_PREFIX "I64" | 191 | # define _PRI64_PREFIX "I64" |
| 192 | # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 | 192 | # elif LONG_MAX >> 30 == 1 |
| 193 | # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX | 193 | # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX |
| 194 | # endif | 194 | # endif |
| 195 | # if !defined PRId64 || @PRI_MACROS_BROKEN@ | 195 | # if !defined PRId64 || @PRI_MACROS_BROKEN@ |
| @@ -206,7 +206,7 @@ | |||
| 206 | # define _PRIu64_PREFIX "l" | 206 | # define _PRIu64_PREFIX "l" |
| 207 | # elif defined _MSC_VER || defined __MINGW32__ | 207 | # elif defined _MSC_VER || defined __MINGW32__ |
| 208 | # define _PRIu64_PREFIX "I64" | 208 | # define _PRIu64_PREFIX "I64" |
| 209 | # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 | 209 | # elif ULONG_MAX >> 31 == 1 |
| 210 | # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX | 210 | # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX |
| 211 | # endif | 211 | # endif |
| 212 | # if !defined PRIo64 || @PRI_MACROS_BROKEN@ | 212 | # if !defined PRIo64 || @PRI_MACROS_BROKEN@ |
| @@ -682,7 +682,7 @@ | |||
| 682 | # define _SCN64_PREFIX "l" | 682 | # define _SCN64_PREFIX "l" |
| 683 | # elif defined _MSC_VER || defined __MINGW32__ | 683 | # elif defined _MSC_VER || defined __MINGW32__ |
| 684 | # define _SCN64_PREFIX "I64" | 684 | # define _SCN64_PREFIX "I64" |
| 685 | # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 | 685 | # elif LONG_MAX >> 30 == 1 |
| 686 | # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX | 686 | # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX |
| 687 | # endif | 687 | # endif |
| 688 | # if !defined SCNd64 || @PRI_MACROS_BROKEN@ | 688 | # if !defined SCNd64 || @PRI_MACROS_BROKEN@ |
| @@ -699,7 +699,7 @@ | |||
| 699 | # define _SCNu64_PREFIX "l" | 699 | # define _SCNu64_PREFIX "l" |
| 700 | # elif defined _MSC_VER || defined __MINGW32__ | 700 | # elif defined _MSC_VER || defined __MINGW32__ |
| 701 | # define _SCNu64_PREFIX "I64" | 701 | # define _SCNu64_PREFIX "I64" |
| 702 | # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 | 702 | # elif ULONG_MAX >> 31 == 1 |
| 703 | # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX | 703 | # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX |
| 704 | # endif | 704 | # endif |
| 705 | # if !defined SCNo64 || @PRI_MACROS_BROKEN@ | 705 | # if !defined SCNo64 || @PRI_MACROS_BROKEN@ |
diff --git a/lib/localtime-buffer.c b/lib/localtime-buffer.c index eb099ff8d84..141849c5461 100644 --- a/lib/localtime-buffer.c +++ b/lib/localtime-buffer.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* Provide access to the last buffer returned by localtime() or gmtime(). | 1 | /* Provide access to the last buffer returned by localtime() or gmtime(). |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software | 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc. |
| 4 | Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/localtime-buffer.h b/lib/localtime-buffer.h index 2552cfcffba..3801742f7ba 100644 --- a/lib/localtime-buffer.h +++ b/lib/localtime-buffer.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* Provide access to the last buffer returned by localtime() or gmtime(). | 1 | /* Provide access to the last buffer returned by localtime() or gmtime(). |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software | 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc. |
| 4 | Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/malloca.c b/lib/malloca.c index 59bd74d598b..975b166daed 100644 --- a/lib/malloca.c +++ b/lib/malloca.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | /* Safe automatic memory allocation. | 1 | /* Safe automatic memory allocation. |
| 2 | Copyright (C) 2003, 2006-2007, 2009-2020 Free Software Foundation, | 2 | Copyright (C) 2003, 2006-2007, 2009-2020 Free Software Foundation, Inc. |
| 3 | Inc. | ||
| 4 | Written by Bruno Haible <bruno@clisp.org>, 2003, 2018. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2003, 2018. |
| 5 | 4 | ||
| 6 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
diff --git a/lib/malloca.h b/lib/malloca.h index 0d0b713c7bd..cfcd4de4ad8 100644 --- a/lib/malloca.h +++ b/lib/malloca.h | |||
| @@ -112,14 +112,10 @@ enum | |||
| 112 | among all elementary types. */ | 112 | among all elementary types. */ |
| 113 | sa_alignment_long = sa_alignof (long), | 113 | sa_alignment_long = sa_alignof (long), |
| 114 | sa_alignment_double = sa_alignof (double), | 114 | sa_alignment_double = sa_alignof (double), |
| 115 | #if HAVE_LONG_LONG_INT | ||
| 116 | sa_alignment_longlong = sa_alignof (long long), | 115 | sa_alignment_longlong = sa_alignof (long long), |
| 117 | #endif | ||
| 118 | sa_alignment_longdouble = sa_alignof (long double), | 116 | sa_alignment_longdouble = sa_alignof (long double), |
| 119 | sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) | 117 | sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) |
| 120 | #if HAVE_LONG_LONG_INT | ||
| 121 | | (sa_alignment_longlong - 1) | 118 | | (sa_alignment_longlong - 1) |
| 122 | #endif | ||
| 123 | | (sa_alignment_longdouble - 1) | 119 | | (sa_alignment_longdouble - 1) |
| 124 | ) + 1 | 120 | ) + 1 |
| 125 | }; | 121 | }; |
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Functions to compute MD5 message digest of files or memory blocks. | 1 | /* Functions to compute MD5 message digest of files or memory blocks. |
| 2 | according to the definition of MD5 in RFC 1321 from April 1992. | 2 | according to the definition of MD5 in RFC 1321 from April 1992. |
| 3 | Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2020 Free | 3 | Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2020 Free Software |
| 4 | Software Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | This file is part of the GNU C Library. | 5 | This file is part of the GNU C Library. |
| 6 | 6 | ||
| 7 | This program is free software; you can redistribute it and/or modify it | 7 | This program is free software; you can redistribute it and/or modify it |
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Declaration of functions and data types used for MD5 sum computing | 1 | /* Declaration of functions and data types used for MD5 sum computing |
| 2 | library functions. | 2 | library functions. |
| 3 | Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2020 Free | 3 | Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2020 Free Software |
| 4 | Software Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | This file is part of the GNU C Library. | 5 | This file is part of the GNU C Library. |
| 6 | 6 | ||
| 7 | This program is free software; you can redistribute it and/or modify it | 7 | This program is free software; you can redistribute it and/or modify it |
diff --git a/lib/memmem.c b/lib/memmem.c index 9108f6f697c..6f6574211f8 100644 --- a/lib/memmem.c +++ b/lib/memmem.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2020 Free | 1 | /* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2020 Free Software |
| 2 | Software Foundation, Inc. | 2 | Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
diff --git a/lib/memrchr.c b/lib/memrchr.c index b4256edcbb9..7ff32e11338 100644 --- a/lib/memrchr.c +++ b/lib/memrchr.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* memrchr -- find the last occurrence of a byte in a memory block | 1 | /* memrchr -- find the last occurrence of a byte in a memory block |
| 2 | 2 | ||
| 3 | Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2020 Free | 3 | Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2020 Free Software |
| 4 | Software Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | Based on strlen implementation by Torbjorn Granlund (tege@sics.se), | 6 | Based on strlen implementation by Torbjorn Granlund (tege@sics.se), |
| 7 | with help from Dan Sahlin (dan@sics.se) and | 7 | with help from Dan Sahlin (dan@sics.se) and |
diff --git a/lib/mktime.c b/lib/mktime.c index a13fa27e2bc..92c00b2b14b 100644 --- a/lib/mktime.c +++ b/lib/mktime.c | |||
| @@ -141,7 +141,7 @@ shr (long_int a, int b) | |||
| 141 | long_int one = 1; | 141 | long_int one = 1; |
| 142 | return (-one >> 1 == -1 | 142 | return (-one >> 1 == -1 |
| 143 | ? a >> b | 143 | ? a >> b |
| 144 | : a / (one << b) - (a % (one << b) < 0)); | 144 | : (a + (a < 0)) / (one << b) - (a < 0)); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | /* Bounds for the intersection of __time64_t and long_int. */ | 147 | /* Bounds for the intersection of __time64_t and long_int. */ |
| @@ -211,8 +211,8 @@ ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1, | |||
| 211 | Take care to avoid integer overflow here. */ | 211 | Take care to avoid integer overflow here. */ |
| 212 | int a4 = shr (year1, 2) + shr (TM_YEAR_BASE, 2) - ! (year1 & 3); | 212 | int a4 = shr (year1, 2) + shr (TM_YEAR_BASE, 2) - ! (year1 & 3); |
| 213 | int b4 = shr (year0, 2) + shr (TM_YEAR_BASE, 2) - ! (year0 & 3); | 213 | int b4 = shr (year0, 2) + shr (TM_YEAR_BASE, 2) - ! (year0 & 3); |
| 214 | int a100 = a4 / 25 - (a4 % 25 < 0); | 214 | int a100 = (a4 + (a4 < 0)) / 25 - (a4 < 0); |
| 215 | int b100 = b4 / 25 - (b4 % 25 < 0); | 215 | int b100 = (b4 + (b4 < 0)) / 25 - (b4 < 0); |
| 216 | int a400 = shr (a100, 2); | 216 | int a400 = shr (a100, 2); |
| 217 | int b400 = shr (b100, 2); | 217 | int b400 = shr (b100, 2); |
| 218 | int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); | 218 | int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); |
diff --git a/lib/nstrftime.c b/lib/nstrftime.c index 667c7ddc56e..fc5052a549c 100644 --- a/lib/nstrftime.c +++ b/lib/nstrftime.c | |||
| @@ -113,7 +113,7 @@ extern char *tzname[]; | |||
| 113 | #define SHR(a, b) \ | 113 | #define SHR(a, b) \ |
| 114 | (-1 >> 1 == -1 \ | 114 | (-1 >> 1 == -1 \ |
| 115 | ? (a) >> (b) \ | 115 | ? (a) >> (b) \ |
| 116 | : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) | 116 | : ((a) + ((a) < 0)) / (1 << (b)) - ((a) < 0)) |
| 117 | 117 | ||
| 118 | #define TM_YEAR_BASE 1900 | 118 | #define TM_YEAR_BASE 1900 |
| 119 | 119 | ||
| @@ -348,8 +348,8 @@ tm_diff (const struct tm *a, const struct tm *b) | |||
| 348 | but it's OK to assume that A and B are close to each other. */ | 348 | but it's OK to assume that A and B are close to each other. */ |
| 349 | int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); | 349 | int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); |
| 350 | int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); | 350 | int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); |
| 351 | int a100 = a4 / 25 - (a4 % 25 < 0); | 351 | int a100 = (a4 + (a4 < 0)) / 25 - (a4 < 0); |
| 352 | int b100 = b4 / 25 - (b4 % 25 < 0); | 352 | int b100 = (b4 + (b4 < 0)) / 25 - (b4 < 0); |
| 353 | int a400 = SHR (a100, 2); | 353 | int a400 = SHR (a100, 2); |
| 354 | int b400 = SHR (b100, 2); | 354 | int b400 = SHR (b100, 2); |
| 355 | int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); | 355 | int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); |
| @@ -927,9 +927,11 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 927 | } | 927 | } |
| 928 | 928 | ||
| 929 | { | 929 | { |
| 930 | int century = tp->tm_year / 100 + TM_YEAR_BASE / 100; | 930 | bool negative_year = tp->tm_year < - TM_YEAR_BASE; |
| 931 | century -= tp->tm_year % 100 < 0 && 0 < century; | 931 | bool zero_thru_1899 = !negative_year & (tp->tm_year < 0); |
| 932 | DO_YEARISH (2, tp->tm_year < - TM_YEAR_BASE, century); | 932 | int century = ((tp->tm_year - 99 * zero_thru_1899) / 100 |
| 933 | + TM_YEAR_BASE / 100); | ||
| 934 | DO_YEARISH (2, negative_year, century); | ||
| 933 | } | 935 | } |
| 934 | 936 | ||
| 935 | case L_('x'): | 937 | case L_('x'): |
| @@ -1138,8 +1140,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1138 | int ndigs = ns_digits; | 1140 | int ndigs = ns_digits; |
| 1139 | while (width < ndigs || (1 < ndigs && n % 10 == 0)) | 1141 | while (width < ndigs || (1 < ndigs && n % 10 == 0)) |
| 1140 | ndigs--, n /= 10; | 1142 | ndigs--, n /= 10; |
| 1141 | for (int i = ndigs; 0 < i; i--) | 1143 | for (int j = ndigs; 0 < j; j--) |
| 1142 | buf[i - 1] = n % 10 + L_('0'), n /= 10; | 1144 | buf[j - 1] = n % 10 + L_('0'), n /= 10; |
| 1143 | if (!pad) | 1145 | if (!pad) |
| 1144 | pad = L_('0'); | 1146 | pad = L_('0'); |
| 1145 | width_cpy (0, ndigs, buf); | 1147 | width_cpy (0, ndigs, buf); |
diff --git a/lib/sha1.c b/lib/sha1.c index 68e74ff3f98..bacf29c4051 100644 --- a/lib/sha1.c +++ b/lib/sha1.c | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | /* sha1.c - Functions to compute SHA1 message digest of files or | 1 | /* sha1.c - Functions to compute SHA1 message digest of files or |
| 2 | memory blocks according to the NIST specification FIPS-180-1. | 2 | memory blocks according to the NIST specification FIPS-180-1. |
| 3 | 3 | ||
| 4 | Copyright (C) 2000-2001, 2003-2006, 2008-2020 Free Software | 4 | Copyright (C) 2000-2001, 2003-2006, 2008-2020 Free Software Foundation, Inc. |
| 5 | Foundation, Inc. | ||
| 6 | 5 | ||
| 7 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
| 8 | under the terms of the GNU General Public License as published by the | 7 | under the terms of the GNU General Public License as published by the |
diff --git a/lib/sig2str.c b/lib/sig2str.c index 47c6cfcf95e..905daea2f20 100644 --- a/lib/sig2str.c +++ b/lib/sig2str.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* sig2str.c -- convert between signal names and numbers | 1 | /* sig2str.c -- convert between signal names and numbers |
| 2 | 2 | ||
| 3 | Copyright (C) 2002, 2004, 2006, 2009-2020 Free Software Foundation, | 3 | Copyright (C) 2002, 2004, 2006, 2009-2020 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/signal.in.h b/lib/signal.in.h index 42e1897f1ea..9fe9f605c3a 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h | |||
| @@ -322,6 +322,12 @@ _GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t, | |||
| 322 | _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, | 322 | _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, |
| 323 | (int sig, _gl_function_taking_int_returning_void_t func)); | 323 | (int sig, _gl_function_taking_int_returning_void_t func)); |
| 324 | # else | 324 | # else |
| 325 | /* On OpenBSD, the declaration of 'signal' may not be present at this point, | ||
| 326 | because it occurs in <sys/signal.h>, not <signal.h> directly. */ | ||
| 327 | # if defined __OpenBSD__ | ||
| 328 | _GL_FUNCDECL_SYS (signal, _gl_function_taking_int_returning_void_t, | ||
| 329 | (int sig, _gl_function_taking_int_returning_void_t func)); | ||
| 330 | # endif | ||
| 325 | _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, | 331 | _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, |
| 326 | (int sig, _gl_function_taking_int_returning_void_t func)); | 332 | (int sig, _gl_function_taking_int_returning_void_t func)); |
| 327 | # endif | 333 | # endif |
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index 2f53411e16c..cd786bed2cd 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h | |||
| @@ -102,7 +102,7 @@ | |||
| 102 | # define _Alignas(a) alignas (a) | 102 | # define _Alignas(a) alignas (a) |
| 103 | # elif ((defined __APPLE__ && defined __MACH__ \ | 103 | # elif ((defined __APPLE__ && defined __MACH__ \ |
| 104 | ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ | 104 | ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ |
| 105 | : __GNUC__) \ | 105 | : __GNUC__ && !defined __ibmxl__) \ |
| 106 | || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ | 106 | || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ |
| 107 | || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) | 107 | || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) |
| 108 | # define _Alignas(a) __attribute__ ((__aligned__ (a))) | 108 | # define _Alignas(a) __attribute__ ((__aligned__ (a))) |
diff --git a/lib/stddef.in.h b/lib/stddef.in.h index e146063c026..2e50a1f01e8 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h | |||
| @@ -83,20 +83,26 @@ | |||
| 83 | 83 | ||
| 84 | /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is | 84 | /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is |
| 85 | a hack in case the configure-time test was done with g++ even though | 85 | a hack in case the configure-time test was done with g++ even though |
| 86 | we are currently compiling with gcc. */ | 86 | we are currently compiling with gcc. |
| 87 | #if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) | 87 | On MSVC, max_align_t is defined only in C++ mode, after <cstddef> was |
| 88 | # if !GNULIB_defined_max_align_t | 88 | included. Its definition is good since it has an alignment of 8 (on x86 |
| 89 | and x86_64). */ | ||
| 90 | #if defined _MSC_VER && defined __cplusplus | ||
| 91 | # include <cstddef> | ||
| 92 | #else | ||
| 93 | # if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) | ||
| 94 | # if !GNULIB_defined_max_align_t | ||
| 89 | /* On the x86, the maximum storage alignment of double, long, etc. is 4, | 95 | /* On the x86, the maximum storage alignment of double, long, etc. is 4, |
| 90 | but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, | 96 | but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, |
| 91 | and the C11 standard allows this. Work around this problem by | 97 | and the C11 standard allows this. Work around this problem by |
| 92 | using __alignof__ (which returns 8 for double) rather than _Alignof | 98 | using __alignof__ (which returns 8 for double) rather than _Alignof |
| 93 | (which returns 4), and align each union member accordingly. */ | 99 | (which returns 4), and align each union member accordingly. */ |
| 94 | # ifdef __GNUC__ | 100 | # ifdef __GNUC__ |
| 95 | # define _GL_STDDEF_ALIGNAS(type) \ | 101 | # define _GL_STDDEF_ALIGNAS(type) \ |
| 96 | __attribute__ ((__aligned__ (__alignof__ (type)))) | 102 | __attribute__ ((__aligned__ (__alignof__ (type)))) |
| 97 | # else | 103 | # else |
| 98 | # define _GL_STDDEF_ALIGNAS(type) /* */ | 104 | # define _GL_STDDEF_ALIGNAS(type) /* */ |
| 99 | # endif | 105 | # endif |
| 100 | typedef union | 106 | typedef union |
| 101 | { | 107 | { |
| 102 | char *__p _GL_STDDEF_ALIGNAS (char *); | 108 | char *__p _GL_STDDEF_ALIGNAS (char *); |
| @@ -104,8 +110,9 @@ typedef union | |||
| 104 | long double __ld _GL_STDDEF_ALIGNAS (long double); | 110 | long double __ld _GL_STDDEF_ALIGNAS (long double); |
| 105 | long int __i _GL_STDDEF_ALIGNAS (long int); | 111 | long int __i _GL_STDDEF_ALIGNAS (long int); |
| 106 | } rpl_max_align_t; | 112 | } rpl_max_align_t; |
| 107 | # define max_align_t rpl_max_align_t | 113 | # define max_align_t rpl_max_align_t |
| 108 | # define GNULIB_defined_max_align_t 1 | 114 | # define GNULIB_defined_max_align_t 1 |
| 115 | # endif | ||
| 109 | # endif | 116 | # endif |
| 110 | #endif | 117 | #endif |
| 111 | 118 | ||
diff --git a/lib/stdint.in.h b/lib/stdint.in.h index a83bc45c79c..994c0c777c0 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h | |||
| @@ -188,7 +188,7 @@ typedef long int gl_int64_t; | |||
| 188 | typedef __int64 gl_int64_t; | 188 | typedef __int64 gl_int64_t; |
| 189 | # define int64_t gl_int64_t | 189 | # define int64_t gl_int64_t |
| 190 | # define GL_INT64_T | 190 | # define GL_INT64_T |
| 191 | # elif @HAVE_LONG_LONG_INT@ | 191 | # else |
| 192 | # undef int64_t | 192 | # undef int64_t |
| 193 | typedef long long int gl_int64_t; | 193 | typedef long long int gl_int64_t; |
| 194 | # define int64_t gl_int64_t | 194 | # define int64_t gl_int64_t |
| @@ -209,7 +209,7 @@ typedef unsigned long int gl_uint64_t; | |||
| 209 | typedef unsigned __int64 gl_uint64_t; | 209 | typedef unsigned __int64 gl_uint64_t; |
| 210 | # define uint64_t gl_uint64_t | 210 | # define uint64_t gl_uint64_t |
| 211 | # define GL_UINT64_T | 211 | # define GL_UINT64_T |
| 212 | # elif @HAVE_UNSIGNED_LONG_LONG_INT@ | 212 | # else |
| 213 | # undef uint64_t | 213 | # undef uint64_t |
| 214 | typedef unsigned long long int gl_uint64_t; | 214 | typedef unsigned long long int gl_uint64_t; |
| 215 | # define uint64_t gl_uint64_t | 215 | # define uint64_t gl_uint64_t |
| @@ -333,7 +333,7 @@ typedef unsigned long int gl_uintptr_t; | |||
| 333 | # ifndef INTMAX_MAX | 333 | # ifndef INTMAX_MAX |
| 334 | # undef INTMAX_C | 334 | # undef INTMAX_C |
| 335 | # undef intmax_t | 335 | # undef intmax_t |
| 336 | # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 | 336 | # if LONG_MAX >> 30 == 1 |
| 337 | typedef long long int gl_intmax_t; | 337 | typedef long long int gl_intmax_t; |
| 338 | # define intmax_t gl_intmax_t | 338 | # define intmax_t gl_intmax_t |
| 339 | # elif defined GL_INT64_T | 339 | # elif defined GL_INT64_T |
| @@ -347,7 +347,7 @@ typedef long int gl_intmax_t; | |||
| 347 | # ifndef UINTMAX_MAX | 347 | # ifndef UINTMAX_MAX |
| 348 | # undef UINTMAX_C | 348 | # undef UINTMAX_C |
| 349 | # undef uintmax_t | 349 | # undef uintmax_t |
| 350 | # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 | 350 | # if ULONG_MAX >> 31 == 1 |
| 351 | typedef unsigned long long int gl_uintmax_t; | 351 | typedef unsigned long long int gl_uintmax_t; |
| 352 | # define uintmax_t gl_uintmax_t | 352 | # define uintmax_t gl_uintmax_t |
| 353 | # elif defined GL_UINT64_T | 353 | # elif defined GL_UINT64_T |
| @@ -647,21 +647,21 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) | |||
| 647 | # define INT64_C(x) x##L | 647 | # define INT64_C(x) x##L |
| 648 | # elif defined _MSC_VER | 648 | # elif defined _MSC_VER |
| 649 | # define INT64_C(x) x##i64 | 649 | # define INT64_C(x) x##i64 |
| 650 | # elif @HAVE_LONG_LONG_INT@ | 650 | # else |
| 651 | # define INT64_C(x) x##LL | 651 | # define INT64_C(x) x##LL |
| 652 | # endif | 652 | # endif |
| 653 | # if ULONG_MAX >> 31 >> 31 >> 1 == 1 | 653 | # if ULONG_MAX >> 31 >> 31 >> 1 == 1 |
| 654 | # define UINT64_C(x) x##UL | 654 | # define UINT64_C(x) x##UL |
| 655 | # elif defined _MSC_VER | 655 | # elif defined _MSC_VER |
| 656 | # define UINT64_C(x) x##ui64 | 656 | # define UINT64_C(x) x##ui64 |
| 657 | # elif @HAVE_UNSIGNED_LONG_LONG_INT@ | 657 | # else |
| 658 | # define UINT64_C(x) x##ULL | 658 | # define UINT64_C(x) x##ULL |
| 659 | # endif | 659 | # endif |
| 660 | 660 | ||
| 661 | /* 7.18.4.2. Macros for greatest-width integer constants */ | 661 | /* 7.18.4.2. Macros for greatest-width integer constants */ |
| 662 | 662 | ||
| 663 | # ifndef INTMAX_C | 663 | # ifndef INTMAX_C |
| 664 | # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 | 664 | # if LONG_MAX >> 30 == 1 |
| 665 | # define INTMAX_C(x) x##LL | 665 | # define INTMAX_C(x) x##LL |
| 666 | # elif defined GL_INT64_T | 666 | # elif defined GL_INT64_T |
| 667 | # define INTMAX_C(x) INT64_C(x) | 667 | # define INTMAX_C(x) INT64_C(x) |
| @@ -671,7 +671,7 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) | |||
| 671 | # endif | 671 | # endif |
| 672 | 672 | ||
| 673 | # ifndef UINTMAX_C | 673 | # ifndef UINTMAX_C |
| 674 | # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 | 674 | # if ULONG_MAX >> 31 == 1 |
| 675 | # define UINTMAX_C(x) x##ULL | 675 | # define UINTMAX_C(x) x##ULL |
| 676 | # elif defined GL_UINT64_T | 676 | # elif defined GL_UINT64_T |
| 677 | # define UINTMAX_C(x) UINT64_C(x) | 677 | # define UINTMAX_C(x) UINT64_C(x) |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 6dc526eaab0..ebcbfaf5e77 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -1259,7 +1259,9 @@ _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) | |||
| 1259 | _GL_CXXALIAS_SYS_CAST (vdprintf, int, | 1259 | _GL_CXXALIAS_SYS_CAST (vdprintf, int, |
| 1260 | (int fd, const char *format, va_list args)); | 1260 | (int fd, const char *format, va_list args)); |
| 1261 | # endif | 1261 | # endif |
| 1262 | # if __GLIBC__ >= 2 | ||
| 1262 | _GL_CXXALIASWARN (vdprintf); | 1263 | _GL_CXXALIASWARN (vdprintf); |
| 1264 | # endif | ||
| 1263 | #elif defined GNULIB_POSIXCHECK | 1265 | #elif defined GNULIB_POSIXCHECK |
| 1264 | # undef vdprintf | 1266 | # undef vdprintf |
| 1265 | # if HAVE_RAW_DECL_VDPRINTF | 1267 | # if HAVE_RAW_DECL_VDPRINTF |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 1524277d799..e088959b285 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* A GNU-like <stdlib.h>. | 1 | /* A GNU-like <stdlib.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995, 2001-2004, 2006-2020 Free Software Foundation, | 3 | Copyright (C) 1995, 2001-2004, 2006-2020 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -600,7 +599,9 @@ _GL_CXXALIAS_RPL (random, long, (void)); | |||
| 600 | # if !@HAVE_RANDOM@ | 599 | # if !@HAVE_RANDOM@ |
| 601 | _GL_FUNCDECL_SYS (random, long, (void)); | 600 | _GL_FUNCDECL_SYS (random, long, (void)); |
| 602 | # endif | 601 | # endif |
| 603 | _GL_CXXALIAS_SYS (random, long, (void)); | 602 | /* Need to cast, because on Haiku, the return type is |
| 603 | int. */ | ||
| 604 | _GL_CXXALIAS_SYS_CAST (random, long, (void)); | ||
| 604 | # endif | 605 | # endif |
| 605 | _GL_CXXALIASWARN (random); | 606 | _GL_CXXALIASWARN (random); |
| 606 | #elif defined GNULIB_POSIXCHECK | 607 | #elif defined GNULIB_POSIXCHECK |
| @@ -767,9 +768,11 @@ _GL_FUNCDECL_SYS (initstate_r, int, | |||
| 767 | struct random_data *rand_state) | 768 | struct random_data *rand_state) |
| 768 | _GL_ARG_NONNULL ((2, 4))); | 769 | _GL_ARG_NONNULL ((2, 4))); |
| 769 | # endif | 770 | # endif |
| 770 | _GL_CXXALIAS_SYS (initstate_r, int, | 771 | /* Need to cast, because on Haiku, the third parameter is |
| 771 | (unsigned int seed, char *buf, size_t buf_size, | 772 | unsigned long buf_size. */ |
| 772 | struct random_data *rand_state)); | 773 | _GL_CXXALIAS_SYS_CAST (initstate_r, int, |
| 774 | (unsigned int seed, char *buf, size_t buf_size, | ||
| 775 | struct random_data *rand_state)); | ||
| 773 | # endif | 776 | # endif |
| 774 | _GL_CXXALIASWARN (initstate_r); | 777 | _GL_CXXALIASWARN (initstate_r); |
| 775 | #elif defined GNULIB_POSIXCHECK | 778 | #elif defined GNULIB_POSIXCHECK |
| @@ -797,8 +800,10 @@ _GL_FUNCDECL_SYS (setstate_r, int, | |||
| 797 | (char *arg_state, struct random_data *rand_state) | 800 | (char *arg_state, struct random_data *rand_state) |
| 798 | _GL_ARG_NONNULL ((1, 2))); | 801 | _GL_ARG_NONNULL ((1, 2))); |
| 799 | # endif | 802 | # endif |
| 800 | _GL_CXXALIAS_SYS (setstate_r, int, | 803 | /* Need to cast, because on Haiku, the first parameter is |
| 801 | (char *arg_state, struct random_data *rand_state)); | 804 | void *arg_state. */ |
| 805 | _GL_CXXALIAS_SYS_CAST (setstate_r, int, | ||
| 806 | (char *arg_state, struct random_data *rand_state)); | ||
| 802 | # endif | 807 | # endif |
| 803 | _GL_CXXALIASWARN (setstate_r); | 808 | _GL_CXXALIASWARN (setstate_r); |
| 804 | #elif defined GNULIB_POSIXCHECK | 809 | #elif defined GNULIB_POSIXCHECK |
diff --git a/lib/strtoimax.c b/lib/strtoimax.c index 95f6f3ff11f..a17b2f0a9d7 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Convert string representation of a number into an intmax_t value. | 1 | /* Convert string representation of a number into an intmax_t value. |
| 2 | 2 | ||
| 3 | Copyright (C) 1999, 2001-2004, 2006, 2009-2020 Free Software | 3 | Copyright (C) 1999, 2001-2004, 2006, 2009-2020 Free Software Foundation, |
| 4 | Foundation, Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| @@ -28,36 +28,30 @@ | |||
| 28 | #include "verify.h" | 28 | #include "verify.h" |
| 29 | 29 | ||
| 30 | #ifdef UNSIGNED | 30 | #ifdef UNSIGNED |
| 31 | # if HAVE_UNSIGNED_LONG_LONG_INT | 31 | # ifndef HAVE_DECL_STRTOULL |
| 32 | # ifndef HAVE_DECL_STRTOULL | ||
| 33 | "this configure-time declaration test was not run" | 32 | "this configure-time declaration test was not run" |
| 34 | # endif | 33 | # endif |
| 35 | # if !HAVE_DECL_STRTOULL | 34 | # if !HAVE_DECL_STRTOULL |
| 36 | unsigned long long int strtoull (char const *, char **, int); | 35 | unsigned long long int strtoull (char const *, char **, int); |
| 37 | # endif | ||
| 38 | # endif | 36 | # endif |
| 39 | 37 | ||
| 40 | #else | 38 | #else |
| 41 | 39 | ||
| 42 | # if HAVE_LONG_LONG_INT | 40 | # ifndef HAVE_DECL_STRTOLL |
| 43 | # ifndef HAVE_DECL_STRTOLL | ||
| 44 | "this configure-time declaration test was not run" | 41 | "this configure-time declaration test was not run" |
| 45 | # endif | 42 | # endif |
| 46 | # if !HAVE_DECL_STRTOLL | 43 | # if !HAVE_DECL_STRTOLL |
| 47 | long long int strtoll (char const *, char **, int); | 44 | long long int strtoll (char const *, char **, int); |
| 48 | # endif | ||
| 49 | # endif | 45 | # endif |
| 50 | #endif | 46 | #endif |
| 51 | 47 | ||
| 52 | #ifdef UNSIGNED | 48 | #ifdef UNSIGNED |
| 53 | # define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT | ||
| 54 | # define Int uintmax_t | 49 | # define Int uintmax_t |
| 55 | # define Strtoimax strtoumax | 50 | # define Strtoimax strtoumax |
| 56 | # define Strtol strtoul | 51 | # define Strtol strtoul |
| 57 | # define Strtoll strtoull | 52 | # define Strtoll strtoull |
| 58 | # define Unsigned unsigned | 53 | # define Unsigned unsigned |
| 59 | #else | 54 | #else |
| 60 | # define Have_long_long HAVE_LONG_LONG_INT | ||
| 61 | # define Int intmax_t | 55 | # define Int intmax_t |
| 62 | # define Strtoimax strtoimax | 56 | # define Strtoimax strtoimax |
| 63 | # define Strtol strtol | 57 | # define Strtol strtol |
| @@ -68,15 +62,11 @@ long long int strtoll (char const *, char **, int); | |||
| 68 | Int | 62 | Int |
| 69 | Strtoimax (char const *ptr, char **endptr, int base) | 63 | Strtoimax (char const *ptr, char **endptr, int base) |
| 70 | { | 64 | { |
| 71 | #if Have_long_long | ||
| 72 | verify (sizeof (Int) == sizeof (Unsigned long int) | 65 | verify (sizeof (Int) == sizeof (Unsigned long int) |
| 73 | || sizeof (Int) == sizeof (Unsigned long long int)); | 66 | || sizeof (Int) == sizeof (Unsigned long long int)); |
| 74 | 67 | ||
| 75 | if (sizeof (Int) != sizeof (Unsigned long int)) | 68 | if (sizeof (Int) != sizeof (Unsigned long int)) |
| 76 | return Strtoll (ptr, endptr, base); | 69 | return Strtoll (ptr, endptr, base); |
| 77 | #else | ||
| 78 | verify (sizeof (Int) == sizeof (Unsigned long int)); | ||
| 79 | #endif | ||
| 80 | 70 | ||
| 81 | return Strtol (ptr, endptr, base); | 71 | return Strtol (ptr, endptr, base); |
| 82 | } | 72 | } |
diff --git a/lib/strtol.c b/lib/strtol.c index a2e1dee99ee..02aafca44ea 100644 --- a/lib/strtol.c +++ b/lib/strtol.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Convert string representation of a number into an integer value. | 1 | /* Convert string representation of a number into an integer value. |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2020 Free | 3 | Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2020 Free Software |
| 4 | Software Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | NOTE: The canonical source of this file is maintained with the GNU C | 6 | NOTE: The canonical source of this file is maintained with the GNU C |
| 7 | Library. Bugs can be reported to bug-glibc@gnu.org. | 7 | Library. Bugs can be reported to bug-glibc@gnu.org. |
diff --git a/lib/strtoll.c b/lib/strtoll.c index 0b8e03c025c..3c7e8c002f0 100644 --- a/lib/strtoll.c +++ b/lib/strtoll.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Function to parse a 'long long int' from text. | 1 | /* Function to parse a 'long long int' from text. |
| 2 | Copyright (C) 1995-1997, 1999, 2001, 2009-2020 Free Software | 2 | Copyright (C) 1995-1997, 1999, 2001, 2009-2020 Free Software Foundation, |
| 3 | Foundation, Inc. | 3 | Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/tempname.c b/lib/tempname.c index 7c46ad14078..0aad0616c85 100644 --- a/lib/tempname.c +++ b/lib/tempname.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* tempname.c - generate the name of a temporary file. | 1 | /* tempname.c - generate the name of a temporary file. |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-2003, 2005-2007, 2009-2020 Free Software | 3 | Copyright (C) 1991-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc. |
| 4 | Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/time_r.c b/lib/time_r.c index 25068ad7276..e8fca2d5c44 100644 --- a/lib/time_r.c +++ b/lib/time_r.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* Reentrant time functions like localtime_r. | 1 | /* Reentrant time functions like localtime_r. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003, 2006-2007, 2010-2020 Free Software Foundation, | 3 | Copyright (C) 2003, 2006-2007, 2010-2020 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index ddb7c5771ba..7909416f366 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #endif | 21 | #endif |
| 22 | @PRAGMA_COLUMNS@ | 22 | @PRAGMA_COLUMNS@ |
| 23 | 23 | ||
| 24 | #ifdef _GL_INCLUDING_UNISTD_H | 24 | #if @HAVE_UNISTD_H@ && defined _GL_INCLUDING_UNISTD_H |
| 25 | /* Special invocation convention: | 25 | /* Special invocation convention: |
| 26 | - On Mac OS X 10.3.9 we have a sequence of nested includes | 26 | - On Mac OS X 10.3.9 we have a sequence of nested includes |
| 27 | <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h> | 27 | <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h> |
| @@ -905,6 +905,11 @@ _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " | |||
| 905 | _GL_FUNCDECL_RPL (getpagesize, int, (void)); | 905 | _GL_FUNCDECL_RPL (getpagesize, int, (void)); |
| 906 | _GL_CXXALIAS_RPL (getpagesize, int, (void)); | 906 | _GL_CXXALIAS_RPL (getpagesize, int, (void)); |
| 907 | # else | 907 | # else |
| 908 | /* On HP-UX, getpagesize exists, but it is not declared in <unistd.h> even if | ||
| 909 | the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used. */ | ||
| 910 | # if defined __hpux | ||
| 911 | _GL_FUNCDECL_SYS (getpagesize, int, (void)); | ||
| 912 | # endif | ||
| 908 | # if !@HAVE_GETPAGESIZE@ | 913 | # if !@HAVE_GETPAGESIZE@ |
| 909 | # if !defined getpagesize | 914 | # if !defined getpagesize |
| 910 | /* This is for POSIX systems. */ | 915 | /* This is for POSIX systems. */ |
| @@ -1672,7 +1677,9 @@ _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); | |||
| 1672 | # if !@HAVE_USLEEP@ | 1677 | # if !@HAVE_USLEEP@ |
| 1673 | _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); | 1678 | _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); |
| 1674 | # endif | 1679 | # endif |
| 1675 | _GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); | 1680 | /* Need to cast, because on Haiku, the first parameter is |
| 1681 | unsigned int n. */ | ||
| 1682 | _GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n)); | ||
| 1676 | # endif | 1683 | # endif |
| 1677 | _GL_CXXALIASWARN (usleep); | 1684 | _GL_CXXALIASWARN (usleep); |
| 1678 | #elif defined GNULIB_POSIXCHECK | 1685 | #elif defined GNULIB_POSIXCHECK |
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h index 6e007b566db..13ee23031a0 100644 --- a/lib/xalloc-oversized.h +++ b/lib/xalloc-oversized.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* xalloc-oversized.h -- memory allocation size checking | 1 | /* xalloc-oversized.h -- memory allocation size checking |
| 2 | 2 | ||
| 3 | Copyright (C) 1990-2000, 2003-2004, 2006-2020 Free Software | 3 | Copyright (C) 1990-2000, 2003-2004, 2006-2020 Free Software Foundation, Inc. |
| 4 | Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |