aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2022-02-23 11:11:52 -0800
committerPaul Eggert2022-02-23 11:41:02 -0800
commit308e63ccfcc6a6b1285bb17eff641f48639fb329 (patch)
treee3f1daf0bdfb7180fc1f007280fa2a4ee43c259c /lib
parent995aed477dc9be708920cc46442673126ed75760 (diff)
downloademacs-308e63ccfcc6a6b1285bb17eff641f48639fb329.tar.gz
emacs-308e63ccfcc6a6b1285bb17eff641f48639fb329.zip
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib')
-rw-r--r--lib/acl-errno-valid.c2
-rw-r--r--lib/acl-internal.c2
-rw-r--r--lib/acl-internal.h2
-rw-r--r--lib/acl.h2
-rw-r--r--lib/acl_entries.c2
-rw-r--r--lib/at-func.c2
-rw-r--r--lib/cdefs.h3
-rw-r--r--lib/close-stream.c2
-rw-r--r--lib/close-stream.h2
-rw-r--r--lib/copy-file-range.c34
-rw-r--r--lib/diffseq.h2
-rw-r--r--lib/dtoastr.c2
-rw-r--r--lib/dtotimespec.c2
-rw-r--r--lib/faccessat.c2
-rw-r--r--lib/fchmodat.c2
-rw-r--r--lib/fdopendir.c2
-rw-r--r--lib/file-has-acl.c2
-rw-r--r--lib/filemode.c2
-rw-r--r--lib/filemode.h2
-rw-r--r--lib/filevercmp.c189
-rw-r--r--lib/filevercmp.h68
-rw-r--r--lib/fpending.c2
-rw-r--r--lib/fpending.h2
-rw-r--r--lib/fstatat.c2
-rw-r--r--lib/fsusage.c2
-rw-r--r--lib/fsusage.h2
-rw-r--r--lib/ftoastr.c2
-rw-r--r--lib/ftoastr.h2
-rw-r--r--lib/futimens.c2
-rw-r--r--lib/get-permissions.c2
-rw-r--r--lib/getloadavg.c2
-rw-r--r--lib/gettime.c2
-rw-r--r--lib/gnulib.mk.in411
-rw-r--r--lib/intprops.h8
-rw-r--r--lib/lchmod.c2
-rw-r--r--lib/memrchr.c2
-rw-r--r--lib/mini-gmp-gnulib.c2
-rw-r--r--lib/mini-gmp.c2
-rw-r--r--lib/mini-gmp.h2
-rw-r--r--lib/mktime.c28
-rw-r--r--lib/nstrftime.c3
-rw-r--r--lib/openat-priv.h2
-rw-r--r--lib/openat-proc.c2
-rw-r--r--lib/openat.h2
-rw-r--r--lib/qcopy-acl.c2
-rw-r--r--lib/readlinkat.c2
-rw-r--r--lib/save-cwd.h2
-rw-r--r--lib/set-permissions.c2
-rw-r--r--lib/sig2str.c2
-rw-r--r--lib/sig2str.h2
-rw-r--r--lib/strftime.h2
-rw-r--r--lib/string.in.h29
-rw-r--r--lib/strtoimax.c2
-rw-r--r--lib/strtol.c2
-rw-r--r--lib/strtoll.c2
-rw-r--r--lib/symlink.c2
-rw-r--r--lib/time-internal.h2
-rw-r--r--lib/time_rz.c2
-rw-r--r--lib/timespec-add.c2
-rw-r--r--lib/timespec-sub.c2
-rw-r--r--lib/timespec.c2
-rw-r--r--lib/timespec.h2
-rw-r--r--lib/unistd.in.h16
-rw-r--r--lib/unlocked-io.h2
-rw-r--r--lib/utimens.c2
-rw-r--r--lib/utimens.h2
-rw-r--r--lib/utimensat.c2
-rw-r--r--lib/vla.h2
68 files changed, 549 insertions, 356 deletions
diff --git a/lib/acl-errno-valid.c b/lib/acl-errno-valid.c
index 39717c35174..a364e413256 100644
--- a/lib/acl-errno-valid.c
+++ b/lib/acl-errno-valid.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/acl-internal.c b/lib/acl-internal.c
index 75a80bf0df2..be244c67a2a 100644
--- a/lib/acl-internal.c
+++ b/lib/acl-internal.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index 582f9e1c1a1..93533762dd0 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/acl.h b/lib/acl.h
index 8b933c20b94..f4d0df80618 100644
--- a/lib/acl.h
+++ b/lib/acl.h
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/acl_entries.c b/lib/acl_entries.c
index e4c014ce715..677de23e0cb 100644
--- a/lib/acl_entries.c
+++ b/lib/acl_entries.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/at-func.c b/lib/at-func.c
index 92d65f6341f..afcc819beb0 100644
--- a/lib/at-func.c
+++ b/lib/at-func.c
@@ -3,7 +3,7 @@
3 3
4 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
5 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
6 the Free Software Foundation; either version 3 of the License, or 6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version. 7 (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
diff --git a/lib/cdefs.h b/lib/cdefs.h
index abf13a90862..44d3826bca9 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -143,7 +143,8 @@
143#define __bos0(ptr) __builtin_object_size (ptr, 0) 143#define __bos0(ptr) __builtin_object_size (ptr, 0)
144 144
145/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */ 145/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */
146#if __USE_FORTIFY_LEVEL == 3 && __glibc_clang_prereq (9, 0) 146#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \
147 || __GNUC_PREREQ (12, 0))
147# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0) 148# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
148# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1) 149# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
149#else 150#else
diff --git a/lib/close-stream.c b/lib/close-stream.c
index 54f3e3c3d0c..9b0e97b271d 100644
--- a/lib/close-stream.c
+++ b/lib/close-stream.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/close-stream.h b/lib/close-stream.h
index 537506c4896..2b4c8ed8f5b 100644
--- a/lib/close-stream.h
+++ b/lib/close-stream.h
@@ -4,7 +4,7 @@
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3 of the License, 7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version. 8 or (at your option) any later version.
9 9
10 This file is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
diff --git a/lib/copy-file-range.c b/lib/copy-file-range.c
index 96f1ec7c5e8..1ec7f4de67c 100644
--- a/lib/copy-file-range.c
+++ b/lib/copy-file-range.c
@@ -20,11 +20,45 @@
20 20
21#include <errno.h> 21#include <errno.h>
22 22
23#if defined __linux__ && HAVE_COPY_FILE_RANGE
24# include <sys/utsname.h>
25#endif
26
23ssize_t 27ssize_t
24copy_file_range (int infd, off_t *pinoff, 28copy_file_range (int infd, off_t *pinoff,
25 int outfd, off_t *poutoff, 29 int outfd, off_t *poutoff,
26 size_t length, unsigned int flags) 30 size_t length, unsigned int flags)
27{ 31{
32#undef copy_file_range
33
34#if defined __linux__ && HAVE_COPY_FILE_RANGE
35 /* The implementation of copy_file_range (which first appeared in
36 Linux kernel release 4.5) had many issues before release 5.3
37 <https://lwn.net/Articles/789527/>, so fail with ENOSYS for Linux
38 kernels 5.2 and earlier.
39
40 This workaround, and the configure-time check for Linux, can be
41 removed when such kernels (released March 2016 through September
42 2019) are no longer a consideration. As of January 2021, the
43 furthest-future planned kernel EOL is December 2024 for kernel
44 release 4.19. */
45
46 static signed char ok;
47
48 if (! ok)
49 {
50 struct utsname name;
51 uname (&name);
52 char *p = name.release;
53 ok = ((p[1] != '.' || '5' < p[0]
54 || (p[0] == '5' && (p[3] != '.' || '2' < p[2])))
55 ? 1 : -1);
56 }
57
58 if (0 < ok)
59 return copy_file_range (infd, pinoff, outfd, poutoff, length, flags);
60#endif
61
28 /* There is little need to emulate copy_file_range with read+write, 62 /* There is little need to emulate copy_file_range with read+write,
29 since programs that use copy_file_range must fall back on 63 since programs that use copy_file_range must fall back on
30 read+write anyway. */ 64 read+write anyway. */
diff --git a/lib/diffseq.h b/lib/diffseq.h
index 0c901a6ecfd..0f76ea1d5ad 100644
--- a/lib/diffseq.h
+++ b/lib/diffseq.h
@@ -5,7 +5,7 @@
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
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
diff --git a/lib/dtoastr.c b/lib/dtoastr.c
index eaade8fa016..71af14c9df4 100644
--- a/lib/dtoastr.c
+++ b/lib/dtoastr.c
@@ -4,7 +4,7 @@
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3 of the License, 7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version. 8 or (at your option) any later version.
9 9
10 This file is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
diff --git a/lib/dtotimespec.c b/lib/dtotimespec.c
index 225a2be67c4..b62a8bd6cfc 100644
--- a/lib/dtotimespec.c
+++ b/lib/dtotimespec.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/faccessat.c b/lib/faccessat.c
index 2c0c07aac10..c1737d03a10 100644
--- a/lib/faccessat.c
+++ b/lib/faccessat.c
@@ -3,7 +3,7 @@
3 3
4 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
5 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
6 the Free Software Foundation; either version 3 of the License, or 6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version. 7 (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
diff --git a/lib/fchmodat.c b/lib/fchmodat.c
index 506e6badd7d..dc535833660 100644
--- a/lib/fchmodat.c
+++ b/lib/fchmodat.c
@@ -3,7 +3,7 @@
3 3
4 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
5 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
6 the Free Software Foundation; either version 3 of the License, or 6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version. 7 (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
diff --git a/lib/fdopendir.c b/lib/fdopendir.c
index a61bad66e23..c2b0e1ed347 100644
--- a/lib/fdopendir.c
+++ b/lib/fdopendir.c
@@ -3,7 +3,7 @@
3 3
4 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
5 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
6 the Free Software Foundation; either version 3 of the License, or 6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version. 7 (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
index 2b6f91ff20a..e02f0626ad3 100644
--- a/lib/file-has-acl.c
+++ b/lib/file-has-acl.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/filemode.c b/lib/filemode.c
index cb508ad12d1..a8cbea844c8 100644
--- a/lib/filemode.c
+++ b/lib/filemode.c
@@ -5,7 +5,7 @@
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
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
diff --git a/lib/filemode.h b/lib/filemode.h
index 7c645c16b51..bf38181cdcd 100644
--- a/lib/filemode.h
+++ b/lib/filemode.h
@@ -5,7 +5,7 @@
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
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
diff --git a/lib/filevercmp.c b/lib/filevercmp.c
index b3e6e2f3cb8..d546e790548 100644
--- a/lib/filevercmp.c
+++ b/lib/filevercmp.c
@@ -1,11 +1,12 @@
1/* 1/* Compare file names containing version numbers.
2
2 Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk> 3 Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk>
3 Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au> 4 Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au>
4 Copyright (C) 2008-2022 Free Software Foundation, Inc. 5 Copyright (C) 2008-2022 Free Software Foundation, Inc.
5 6
6 This file is free software: you can redistribute it and/or modify 7 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 8 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 3 of the 9 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version. 10 License, or (at your option) any later version.
10 11
11 This file is distributed in the hope that it will be useful, 12 This file is distributed in the hope that it will be useful,
@@ -19,60 +20,65 @@
19#include <config.h> 20#include <config.h>
20#include "filevercmp.h" 21#include "filevercmp.h"
21 22
22#include <sys/types.h>
23#include <stdlib.h>
24#include <stdbool.h> 23#include <stdbool.h>
25#include <string.h>
26#include <c-ctype.h> 24#include <c-ctype.h>
27#include <limits.h> 25#include <limits.h>
28 26#include <idx.h>
29/* Match a file suffix defined by this regular expression: 27#include <verify.h>
30 /(\.[A-Za-z~][A-Za-z0-9~]*)*$/ 28
31 Scan the string *STR and return a pointer to the matching suffix, or 29/* Return the length of a prefix of S that corresponds to the suffix
32 NULL if not found. Upon return, *STR points to terminating NUL. */ 30 defined by this extended regular expression in the C locale:
33static const char * 31 (\.[A-Za-z~][A-Za-z0-9~]*)*$
34match_suffix (const char **str) 32 If *LEN is -1, S is a string; set *LEN to S's length.
33 Otherwise, *LEN should be nonnegative, S is a char array,
34 and *LEN does not change. */
35static idx_t
36file_prefixlen (char const *s, ptrdiff_t *len)
35{ 37{
36 const char *match = NULL; 38 size_t n = *len; /* SIZE_MAX if N == -1. */
37 bool read_alpha = false; 39
38 while (**str) 40 for (idx_t i = 0; ; i++)
39 { 41 {
40 if (read_alpha) 42 idx_t prefixlen = i;
41 { 43 while (i + 1 < n && s[i] == '.' && (c_isalpha (s[i + 1])
42 read_alpha = false; 44 || s[i + 1] == '~'))
43 if (!c_isalpha (**str) && '~' != **str) 45 for (i += 2; i < n && (c_isalnum (s[i]) || s[i] == '~'); i++)
44 match = NULL; 46 continue;
45 } 47
46 else if ('.' == **str) 48 if (*len < 0 ? !s[i] : i == n)
47 { 49 {
48 read_alpha = true; 50 *len = i;
49 if (!match) 51 return prefixlen;
50 match = *str;
51 } 52 }
52 else if (!c_isalnum (**str) && '~' != **str)
53 match = NULL;
54 (*str)++;
55 } 53 }
56 return match;
57} 54}
58 55
59/* verrevcmp helper function */ 56/* Return a version sort comparison value for S's byte at position POS.
57 S has length LEN. If POS == LEN, sort before all non-'~' bytes. */
58
60static int 59static int
61order (unsigned char c) 60order (char const *s, idx_t pos, idx_t len)
62{ 61{
62 if (pos == len)
63 return -1;
64
65 unsigned char c = s[pos];
63 if (c_isdigit (c)) 66 if (c_isdigit (c))
64 return 0; 67 return 0;
65 else if (c_isalpha (c)) 68 else if (c_isalpha (c))
66 return c; 69 return c;
67 else if (c == '~') 70 else if (c == '~')
68 return -1; 71 return -2;
69 else 72 else
70 return (int) c + UCHAR_MAX + 1; 73 {
74 verify (UCHAR_MAX <= (INT_MAX - 1 - 2) / 2);
75 return c + UCHAR_MAX + 1;
76 }
71} 77}
72 78
73/* slightly modified verrevcmp function from dpkg 79/* slightly modified verrevcmp function from dpkg
74 S1, S2 - compared string 80 S1, S2 - compared char array
75 S1_LEN, S2_LEN - length of strings to be scanned 81 S1_LEN, S2_LEN - length of arrays to be scanned
76 82
77 This implements the algorithm for comparison of version strings 83 This implements the algorithm for comparison of version strings
78 specified by Debian and now widely adopted. The detailed 84 specified by Debian and now widely adopted. The detailed
@@ -81,37 +87,38 @@ order (unsigned char c)
81 implements that from s5.6.12 of Debian Policy v3.8.0.1 87 implements that from s5.6.12 of Debian Policy v3.8.0.1
82 https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version */ 88 https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version */
83static int _GL_ATTRIBUTE_PURE 89static int _GL_ATTRIBUTE_PURE
84verrevcmp (const char *s1, size_t s1_len, const char *s2, size_t s2_len) 90verrevcmp (const char *s1, idx_t s1_len, const char *s2, idx_t s2_len)
85{ 91{
86 size_t s1_pos = 0; 92 idx_t s1_pos = 0;
87 size_t s2_pos = 0; 93 idx_t s2_pos = 0;
88 while (s1_pos < s1_len || s2_pos < s2_len) 94 while (s1_pos < s1_len || s2_pos < s2_len)
89 { 95 {
90 int first_diff = 0; 96 int first_diff = 0;
91 while ((s1_pos < s1_len && !c_isdigit (s1[s1_pos])) 97 while ((s1_pos < s1_len && !c_isdigit (s1[s1_pos]))
92 || (s2_pos < s2_len && !c_isdigit (s2[s2_pos]))) 98 || (s2_pos < s2_len && !c_isdigit (s2[s2_pos])))
93 { 99 {
94 int s1_c = (s1_pos == s1_len) ? 0 : order (s1[s1_pos]); 100 int s1_c = order (s1, s1_pos, s1_len);
95 int s2_c = (s2_pos == s2_len) ? 0 : order (s2[s2_pos]); 101 int s2_c = order (s2, s2_pos, s2_len);
96 if (s1_c != s2_c) 102 if (s1_c != s2_c)
97 return s1_c - s2_c; 103 return s1_c - s2_c;
98 s1_pos++; 104 s1_pos++;
99 s2_pos++; 105 s2_pos++;
100 } 106 }
101 while (s1[s1_pos] == '0') 107 while (s1_pos < s1_len && s1[s1_pos] == '0')
102 s1_pos++; 108 s1_pos++;
103 while (s2[s2_pos] == '0') 109 while (s2_pos < s2_len && s2[s2_pos] == '0')
104 s2_pos++; 110 s2_pos++;
105 while (c_isdigit (s1[s1_pos]) && c_isdigit (s2[s2_pos])) 111 while (s1_pos < s1_len && s2_pos < s2_len
112 && c_isdigit (s1[s1_pos]) && c_isdigit (s2[s2_pos]))
106 { 113 {
107 if (!first_diff) 114 if (!first_diff)
108 first_diff = s1[s1_pos] - s2[s2_pos]; 115 first_diff = s1[s1_pos] - s2[s2_pos];
109 s1_pos++; 116 s1_pos++;
110 s2_pos++; 117 s2_pos++;
111 } 118 }
112 if (c_isdigit (s1[s1_pos])) 119 if (s1_pos < s1_len && c_isdigit (s1[s1_pos]))
113 return 1; 120 return 1;
114 if (c_isdigit (s2[s2_pos])) 121 if (s2_pos < s2_len && c_isdigit (s2[s2_pos]))
115 return -1; 122 return -1;
116 if (first_diff) 123 if (first_diff)
117 return first_diff; 124 return first_diff;
@@ -124,58 +131,56 @@ verrevcmp (const char *s1, size_t s1_len, const char *s2, size_t s2_len)
124int 131int
125filevercmp (const char *s1, const char *s2) 132filevercmp (const char *s1, const char *s2)
126{ 133{
127 const char *s1_pos; 134 return filenvercmp (s1, -1, s2, -1);
128 const char *s2_pos; 135}
129 const char *s1_suffix, *s2_suffix;
130 size_t s1_len, s2_len;
131 int result;
132
133 /* easy comparison to see if strings are identical */
134 int simple_cmp = strcmp (s1, s2);
135 if (simple_cmp == 0)
136 return 0;
137 136
138 /* special handle for "", "." and ".." */ 137/* Compare versions A (of length ALEN) and B (of length BLEN).
139 if (!*s1) 138 See filevercmp.h for function description. */
140 return -1; 139int
141 if (!*s2) 140filenvercmp (char const *a, ptrdiff_t alen, char const *b, ptrdiff_t blen)
142 return 1; 141{
143 if (0 == strcmp (".", s1)) 142 /* Special case for empty versions. */
144 return -1; 143 bool aempty = alen < 0 ? !a[0] : !alen;
145 if (0 == strcmp (".", s2)) 144 bool bempty = blen < 0 ? !b[0] : !blen;
146 return 1; 145 if (aempty)
147 if (0 == strcmp ("..", s1)) 146 return -!bempty;
148 return -1; 147 if (bempty)
149 if (0 == strcmp ("..", s2))
150 return 1; 148 return 1;
151 149
152 /* special handle for other hidden files */ 150 /* Special cases for leading ".": "." sorts first, then "..", then
153 if (*s1 == '.' && *s2 != '.') 151 other names with leading ".", then other names. */
154 return -1; 152 if (a[0] == '.')
155 if (*s1 != '.' && *s2 == '.')
156 return 1;
157 if (*s1 == '.' && *s2 == '.')
158 { 153 {
159 s1++; 154 if (b[0] != '.')
160 s2++; 155 return -1;
161 }
162 156
163 /* "cut" file suffixes */ 157 bool adot = alen < 0 ? !a[1] : alen == 1;
164 s1_pos = s1; 158 bool bdot = blen < 0 ? !b[1] : blen == 1;
165 s2_pos = s2; 159 if (adot)
166 s1_suffix = match_suffix (&s1_pos); 160 return -!bdot;
167 s2_suffix = match_suffix (&s2_pos); 161 if (bdot)
168 s1_len = (s1_suffix ? s1_suffix : s1_pos) - s1; 162 return 1;
169 s2_len = (s2_suffix ? s2_suffix : s2_pos) - s2; 163
170 164 bool adotdot = a[1] == '.' && (alen < 0 ? !a[2] : alen == 2);
171 /* restore file suffixes if strings are identical after "cut" */ 165 bool bdotdot = b[1] == '.' && (blen < 0 ? !b[2] : blen == 2);
172 if ((s1_suffix || s2_suffix) && (s1_len == s2_len) 166 if (adotdot)
173 && 0 == strncmp (s1, s2, s1_len)) 167 return -!bdotdot;
174 { 168 if (bdotdot)
175 s1_len = s1_pos - s1; 169 return 1;
176 s2_len = s2_pos - s2;
177 } 170 }
171 else if (b[0] == '.')
172 return 1;
173
174 /* Cut file suffixes. */
175 idx_t aprefixlen = file_prefixlen (a, &alen);
176 idx_t bprefixlen = file_prefixlen (b, &blen);
177
178 /* If both suffixes are empty, a second pass would return the same thing. */
179 bool one_pass_only = aprefixlen == alen && bprefixlen == blen;
180
181 int result = verrevcmp (a, aprefixlen, b, bprefixlen);
178 182
179 result = verrevcmp (s1, s1_len, s2, s2_len); 183 /* Return the initial result if nonzero, or if no second pass is needed.
180 return result == 0 ? simple_cmp : result; 184 Otherwise, restore the suffixes and try again. */
185 return result || one_pass_only ? result : verrevcmp (a, alen, b, blen);
181} 186}
diff --git a/lib/filevercmp.h b/lib/filevercmp.h
index 98020e66674..5a336776719 100644
--- a/lib/filevercmp.h
+++ b/lib/filevercmp.h
@@ -1,11 +1,12 @@
1/* 1/* Compare file names containing version numbers.
2
2 Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk> 3 Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk>
3 Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au> 4 Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au>
4 Copyright (C) 2008-2022 Free Software Foundation, Inc. 5 Copyright (C) 2008-2022 Free Software Foundation, Inc.
5 6
6 This file is free software: you can redistribute it and/or modify 7 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 8 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 3 of the 9 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version. 10 License, or (at your option) any later version.
10 11
11 This file is distributed in the hope that it will be useful, 12 This file is distributed in the hope that it will be useful,
@@ -19,24 +20,57 @@
19#ifndef FILEVERCMP_H 20#ifndef FILEVERCMP_H
20#define FILEVERCMP_H 21#define FILEVERCMP_H
21 22
22/* Compare version strings: 23#include <stddef.h>
24
25/* Compare strings A and B as file names containing version numbers,
26 and return an integer that is negative, zero, or positive depending
27 on whether A compares less than, equal to, or greater than B.
28
29 Use the following version sort algorithm:
30
31 1. Compare the strings' maximal-length non-digit prefixes lexically.
32 If there is a difference return that difference.
33 Otherwise discard the prefixes and continue with the next step.
34
35 2. Compare the strings' maximal-length digit prefixes, using
36 numeric comparison of the numbers represented by each prefix.
37 (Treat an empty prefix as zero; this can happen only at string end.)
38 If there is a difference, return that difference.
39 Otherwise discard the prefixes and continue with the next step.
40
41 3. If both strings are empty, return 0. Otherwise continue with step 1.
42
43 In version sort, lexical comparison is left to right, byte by byte,
44 using the byte's numeric value (0-255), except that:
45
46 1. ASCII letters sort before other bytes.
47 2. A tilde sorts before anything, even an empty string.
48
49 In addition to the version sort rules, the following strings have
50 special priority and sort before all other strings (listed in order):
23 51
24 This function compares strings S1 and S2: 52 1. The empty string.
25 1) By PREFIX in the same way as strcmp. 53 2. ".".
26 2) Then by VERSION (most similarly to version compare of Debian's dpkg). 54 3. "..".
27 Leading zeros in version numbers are ignored. 55 4. Strings starting with "." sort before other strings.
28 3) If both (PREFIX and VERSION) are equal, strcmp function is used for
29 comparison. So this function can return 0 if (and only if) strings S1
30 and S2 are identical.
31 56
32 It returns number >0 for S1 > S2, 0 for S1 == S2 and number <0 for S1 < S2. 57 Before comparing two strings where both begin with non-".",
58 or where both begin with "." but neither is "." or "..",
59 suffixes matching the C-locale extended regular expression
60 (\.[A-Za-z~][A-Za-z0-9~]*)*$ are removed and the strings compared
61 without them, using version sort without special priority;
62 if they do not compare equal, this comparison result is used and
63 the suffixes are effectively ignored. Otherwise, the entire
64 strings are compared using version sort.
33 65
34 This function compares strings, in a way that if VER1 and VER2 are version 66 This function is intended to be a replacement for strverscmp. */
35 numbers and PREFIX and SUFFIX (SUFFIX defined as (\.[A-Za-z~][A-Za-z0-9~]*)*) 67int filevercmp (char const *a, char const *b) _GL_ATTRIBUTE_PURE;
36 are strings then VER1 < VER2 implies filevercmp (PREFIX VER1 SUFFIX,
37 PREFIX VER2 SUFFIX) < 0.
38 68
39 This function is intended to be a replacement for strverscmp. */ 69/* Like filevercmp, except compare the byte arrays A (of length ALEN)
40int filevercmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE; 70 and B (of length BLEN) so that A and B can contain '\0', which
71 sorts just before '\1'. But if ALEN is -1 treat A as a string
72 terminated by '\0', and similarly for BLEN. */
73int filenvercmp (char const *a, ptrdiff_t alen, char const *b, ptrdiff_t blen)
74 _GL_ATTRIBUTE_PURE;
41 75
42#endif /* FILEVERCMP_H */ 76#endif /* FILEVERCMP_H */
diff --git a/lib/fpending.c b/lib/fpending.c
index 617f3977f8f..6408cff4647 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/fpending.h b/lib/fpending.h
index 2b45e9031bb..43542c5b8ad 100644
--- a/lib/fpending.h
+++ b/lib/fpending.h
@@ -5,7 +5,7 @@
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
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
diff --git a/lib/fstatat.c b/lib/fstatat.c
index 56de0cab4b2..6e8344964bc 100644
--- a/lib/fstatat.c
+++ b/lib/fstatat.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/fsusage.c b/lib/fsusage.c
index 734f0fc7460..18f790f6e7b 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -5,7 +5,7 @@
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 7 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 3 of the 8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version. 9 License, or (at your option) any later version.
10 10
11 This file is distributed in the hope that it will be useful, 11 This file is distributed in the hope that it will be useful,
diff --git a/lib/fsusage.h b/lib/fsusage.h
index f4f50aba29c..0443d19f922 100644
--- a/lib/fsusage.h
+++ b/lib/fsusage.h
@@ -5,7 +5,7 @@
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 7 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 3 of the 8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version. 9 License, or (at your option) any later version.
10 10
11 This file is distributed in the hope that it will be useful, 11 This file is distributed in the hope that it will be useful,
diff --git a/lib/ftoastr.c b/lib/ftoastr.c
index 4349c8c5611..91057529221 100644
--- a/lib/ftoastr.c
+++ b/lib/ftoastr.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/ftoastr.h b/lib/ftoastr.h
index 065574a9ff4..bac32a387e2 100644
--- a/lib/ftoastr.h
+++ b/lib/ftoastr.h
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/futimens.c b/lib/futimens.c
index 97228242b1e..bc3e41a9439 100644
--- a/lib/futimens.c
+++ b/lib/futimens.c
@@ -3,7 +3,7 @@
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 3 of the 6 published by the Free Software Foundation, either version 3 of the
7 License, or (at your option) any later version. 7 License, or (at your option) any later version.
8 8
9 This file is distributed in the hope that it will be useful, 9 This file is distributed in the hope that it will be useful,
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
index a17b791c8d8..ff79adae72f 100644
--- a/lib/get-permissions.c
+++ b/lib/get-permissions.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/getloadavg.c b/lib/getloadavg.c
index 53d1b81a3ba..37e82808671 100644
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -8,7 +8,7 @@
8 8
9 This program is free software: you can redistribute it and/or modify 9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or 11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version. 12 (at your option) any later version.
13 13
14 This program is distributed in the hope that it will be useful, 14 This program is distributed in the hope that it will be useful,
diff --git a/lib/gettime.c b/lib/gettime.c
index a44a69dfc43..541af18bbfa 100644
--- a/lib/gettime.c
+++ b/lib/gettime.c
@@ -4,7 +4,7 @@
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 3 of the 7 published by the Free Software Foundation, either version 3 of the
8 License, or (at your option) any later version. 8 License, or (at your option) any later version.
9 9
10 This file is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index a8a6cd782d5..6b90a80f64a 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -3,7 +3,7 @@
3# 3#
4# This file is free software; you can redistribute it and/or modify 4# This file is free software; you can redistribute it and/or modify
5# 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
6# the Free Software Foundation; either version 3 of the License, or 6# the Free Software Foundation, either version 3 of the License, or
7# (at your option) any later version. 7# (at your option) any later version.
8# 8#
9# This file is distributed in the hope that it will be useful, 9# This file is distributed in the hope that it will be useful,
@@ -191,6 +191,10 @@ BUILD_DETAILS = @BUILD_DETAILS@
191BYTESWAP_H = @BYTESWAP_H@ 191BYTESWAP_H = @BYTESWAP_H@
192CAIRO_CFLAGS = @CAIRO_CFLAGS@ 192CAIRO_CFLAGS = @CAIRO_CFLAGS@
193CAIRO_LIBS = @CAIRO_LIBS@ 193CAIRO_LIBS = @CAIRO_LIBS@
194CAIRO_XCB_CFLAGS = @CAIRO_XCB_CFLAGS@
195CAIRO_XCB_LIBS = @CAIRO_XCB_LIBS@
196CAIRO_XLIB_CFLAGS = @CAIRO_XLIB_CFLAGS@
197CAIRO_XLIB_LIBS = @CAIRO_XLIB_LIBS@
194CC = @CC@ 198CC = @CC@
195CFLAGS = @CFLAGS@ 199CFLAGS = @CFLAGS@
196CFLAGS_SOUND = @CFLAGS_SOUND@ 200CFLAGS_SOUND = @CFLAGS_SOUND@
@@ -247,7 +251,59 @@ GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
247GETOPT_H = @GETOPT_H@ 251GETOPT_H = @GETOPT_H@
248GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@ 252GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@
249GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@ 253GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@
254GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
255GL_CFLAG_GNULIB_WARNINGS = @GL_CFLAG_GNULIB_WARNINGS@
250GL_COND_LIBTOOL_CONDITION = @GL_COND_LIBTOOL_CONDITION@ 256GL_COND_LIBTOOL_CONDITION = @GL_COND_LIBTOOL_CONDITION@
257GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION = @GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION@
258GL_COND_OBJ_COPY_FILE_RANGE_CONDITION = @GL_COND_OBJ_COPY_FILE_RANGE_CONDITION@
259GL_COND_OBJ_DIRFD_CONDITION = @GL_COND_OBJ_DIRFD_CONDITION@
260GL_COND_OBJ_DUP2_CONDITION = @GL_COND_OBJ_DUP2_CONDITION@
261GL_COND_OBJ_EUIDACCESS_CONDITION = @GL_COND_OBJ_EUIDACCESS_CONDITION@
262GL_COND_OBJ_EXECINFO_CONDITION = @GL_COND_OBJ_EXECINFO_CONDITION@
263GL_COND_OBJ_EXPLICIT_BZERO_CONDITION = @GL_COND_OBJ_EXPLICIT_BZERO_CONDITION@
264GL_COND_OBJ_FACCESSAT_CONDITION = @GL_COND_OBJ_FACCESSAT_CONDITION@
265GL_COND_OBJ_FCHMODAT_CONDITION = @GL_COND_OBJ_FCHMODAT_CONDITION@
266GL_COND_OBJ_FCNTL_CONDITION = @GL_COND_OBJ_FCNTL_CONDITION@
267GL_COND_OBJ_FDOPENDIR_CONDITION = @GL_COND_OBJ_FDOPENDIR_CONDITION@
268GL_COND_OBJ_FPENDING_CONDITION = @GL_COND_OBJ_FPENDING_CONDITION@
269GL_COND_OBJ_FREE_CONDITION = @GL_COND_OBJ_FREE_CONDITION@
270GL_COND_OBJ_FSTATAT_CONDITION = @GL_COND_OBJ_FSTATAT_CONDITION@
271GL_COND_OBJ_FSUSAGE_CONDITION = @GL_COND_OBJ_FSUSAGE_CONDITION@
272GL_COND_OBJ_FSYNC_CONDITION = @GL_COND_OBJ_FSYNC_CONDITION@
273GL_COND_OBJ_FUTIMENS_CONDITION = @GL_COND_OBJ_FUTIMENS_CONDITION@
274GL_COND_OBJ_GETDTABLESIZE_CONDITION = @GL_COND_OBJ_GETDTABLESIZE_CONDITION@
275GL_COND_OBJ_GETGROUPS_CONDITION = @GL_COND_OBJ_GETGROUPS_CONDITION@
276GL_COND_OBJ_GETLOADAVG_CONDITION = @GL_COND_OBJ_GETLOADAVG_CONDITION@
277GL_COND_OBJ_GETOPT_CONDITION = @GL_COND_OBJ_GETOPT_CONDITION@
278GL_COND_OBJ_GETRANDOM_CONDITION = @GL_COND_OBJ_GETRANDOM_CONDITION@
279GL_COND_OBJ_GETTIMEOFDAY_CONDITION = @GL_COND_OBJ_GETTIMEOFDAY_CONDITION@
280GL_COND_OBJ_GROUP_MEMBER_CONDITION = @GL_COND_OBJ_GROUP_MEMBER_CONDITION@
281GL_COND_OBJ_LCHMOD_CONDITION = @GL_COND_OBJ_LCHMOD_CONDITION@
282GL_COND_OBJ_LSTAT_CONDITION = @GL_COND_OBJ_LSTAT_CONDITION@
283GL_COND_OBJ_MEMPCPY_CONDITION = @GL_COND_OBJ_MEMPCPY_CONDITION@
284GL_COND_OBJ_MEMRCHR_CONDITION = @GL_COND_OBJ_MEMRCHR_CONDITION@
285GL_COND_OBJ_MINI_GMP_GNULIB_CONDITION = @GL_COND_OBJ_MINI_GMP_GNULIB_CONDITION@
286GL_COND_OBJ_MKOSTEMP_CONDITION = @GL_COND_OBJ_MKOSTEMP_CONDITION@
287GL_COND_OBJ_OPEN_CONDITION = @GL_COND_OBJ_OPEN_CONDITION@
288GL_COND_OBJ_PSELECT_CONDITION = @GL_COND_OBJ_PSELECT_CONDITION@
289GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION = @GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION@
290GL_COND_OBJ_RAWMEMCHR_CONDITION = @GL_COND_OBJ_RAWMEMCHR_CONDITION@
291GL_COND_OBJ_READLINKAT_CONDITION = @GL_COND_OBJ_READLINKAT_CONDITION@
292GL_COND_OBJ_READLINK_CONDITION = @GL_COND_OBJ_READLINK_CONDITION@
293GL_COND_OBJ_REGEX_CONDITION = @GL_COND_OBJ_REGEX_CONDITION@
294GL_COND_OBJ_SIG2STR_CONDITION = @GL_COND_OBJ_SIG2STR_CONDITION@
295GL_COND_OBJ_SIGDESCR_NP_CONDITION = @GL_COND_OBJ_SIGDESCR_NP_CONDITION@
296GL_COND_OBJ_STDIO_READ_CONDITION = @GL_COND_OBJ_STDIO_READ_CONDITION@
297GL_COND_OBJ_STDIO_WRITE_CONDITION = @GL_COND_OBJ_STDIO_WRITE_CONDITION@
298GL_COND_OBJ_STPCPY_CONDITION = @GL_COND_OBJ_STPCPY_CONDITION@
299GL_COND_OBJ_STRNLEN_CONDITION = @GL_COND_OBJ_STRNLEN_CONDITION@
300GL_COND_OBJ_STRTOIMAX_CONDITION = @GL_COND_OBJ_STRTOIMAX_CONDITION@
301GL_COND_OBJ_STRTOLL_CONDITION = @GL_COND_OBJ_STRTOLL_CONDITION@
302GL_COND_OBJ_SYMLINK_CONDITION = @GL_COND_OBJ_SYMLINK_CONDITION@
303GL_COND_OBJ_TIMEGM_CONDITION = @GL_COND_OBJ_TIMEGM_CONDITION@
304GL_COND_OBJ_TIME_RZ_CONDITION = @GL_COND_OBJ_TIME_RZ_CONDITION@
305GL_COND_OBJ_TIME_R_CONDITION = @GL_COND_OBJ_TIME_R_CONDITION@
306GL_COND_OBJ_UTIMENSAT_CONDITION = @GL_COND_OBJ_UTIMENSAT_CONDITION@
251GL_GENERATE_ALLOCA_H_CONDITION = @GL_GENERATE_ALLOCA_H_CONDITION@ 307GL_GENERATE_ALLOCA_H_CONDITION = @GL_GENERATE_ALLOCA_H_CONDITION@
252GL_GENERATE_BYTESWAP_H_CONDITION = @GL_GENERATE_BYTESWAP_H_CONDITION@ 308GL_GENERATE_BYTESWAP_H_CONDITION = @GL_GENERATE_BYTESWAP_H_CONDITION@
253GL_GENERATE_ERRNO_H_CONDITION = @GL_GENERATE_ERRNO_H_CONDITION@ 309GL_GENERATE_ERRNO_H_CONDITION = @GL_GENERATE_ERRNO_H_CONDITION@
@@ -974,6 +1030,7 @@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
974REPLACE_CHOWN = @REPLACE_CHOWN@ 1030REPLACE_CHOWN = @REPLACE_CHOWN@
975REPLACE_CLOSE = @REPLACE_CLOSE@ 1031REPLACE_CLOSE = @REPLACE_CLOSE@
976REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ 1032REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
1033REPLACE_COPY_FILE_RANGE = @REPLACE_COPY_FILE_RANGE@
977REPLACE_CREAT = @REPLACE_CREAT@ 1034REPLACE_CREAT = @REPLACE_CREAT@
978REPLACE_CTIME = @REPLACE_CTIME@ 1035REPLACE_CTIME = @REPLACE_CTIME@
979REPLACE_DIRFD = @REPLACE_DIRFD@ 1036REPLACE_DIRFD = @REPLACE_DIRFD@
@@ -1197,6 +1254,8 @@ XOBJ = @XOBJ@
1197XRANDR_CFLAGS = @XRANDR_CFLAGS@ 1254XRANDR_CFLAGS = @XRANDR_CFLAGS@
1198XRANDR_LIBS = @XRANDR_LIBS@ 1255XRANDR_LIBS = @XRANDR_LIBS@
1199XRENDER_LIBS = @XRENDER_LIBS@ 1256XRENDER_LIBS = @XRENDER_LIBS@
1257XSYNC_CFLAGS = @XSYNC_CFLAGS@
1258XSYNC_LIBS = @XSYNC_LIBS@
1200XWIDGETS_OBJ = @XWIDGETS_OBJ@ 1259XWIDGETS_OBJ = @XWIDGETS_OBJ@
1201X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@ 1260X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@
1202ac_ct_CC = @ac_ct_CC@ 1261ac_ct_CC = @ac_ct_CC@
@@ -1251,8 +1310,10 @@ gl_GNULIB_ENABLED_rawmemchr_CONDITION = @gl_GNULIB_ENABLED_rawmemchr_CONDITION@
1251gl_GNULIB_ENABLED_scratch_buffer_CONDITION = @gl_GNULIB_ENABLED_scratch_buffer_CONDITION@ 1310gl_GNULIB_ENABLED_scratch_buffer_CONDITION = @gl_GNULIB_ENABLED_scratch_buffer_CONDITION@
1252gl_GNULIB_ENABLED_strtoll_CONDITION = @gl_GNULIB_ENABLED_strtoll_CONDITION@ 1311gl_GNULIB_ENABLED_strtoll_CONDITION = @gl_GNULIB_ENABLED_strtoll_CONDITION@
1253gl_GNULIB_ENABLED_utimens_CONDITION = @gl_GNULIB_ENABLED_utimens_CONDITION@ 1312gl_GNULIB_ENABLED_utimens_CONDITION = @gl_GNULIB_ENABLED_utimens_CONDITION@
1313gl_LIBOBJDEPS = @gl_LIBOBJDEPS@
1254gl_LIBOBJS = @gl_LIBOBJS@ 1314gl_LIBOBJS = @gl_LIBOBJS@
1255gl_LTLIBOBJS = @gl_LTLIBOBJS@ 1315gl_LTLIBOBJS = @gl_LTLIBOBJS@
1316gltests_LIBOBJDEPS = @gltests_LIBOBJDEPS@
1256gltests_LIBOBJS = @gltests_LIBOBJS@ 1317gltests_LIBOBJS = @gltests_LIBOBJS@
1257gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ 1318gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
1258gltests_WITNESS = @gltests_WITNESS@ 1319gltests_WITNESS = @gltests_WITNESS@
@@ -1303,6 +1364,7 @@ x_default_search_path = @x_default_search_path@
1303noinst_LIBRARIES += libgnu.a 1364noinst_LIBRARIES += libgnu.a
1304 1365
1305libgnu_a_SOURCES = 1366libgnu_a_SOURCES =
1367libgnu_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS)
1306libgnu_a_LIBADD = $(gl_LIBOBJS) 1368libgnu_a_LIBADD = $(gl_LIBOBJS)
1307libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) 1369libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
1308EXTRA_libgnu_a_SOURCES = 1370EXTRA_libgnu_a_SOURCES =
@@ -1432,10 +1494,9 @@ endif
1432## begin gnulib module canonicalize-lgpl 1494## begin gnulib module canonicalize-lgpl
1433ifeq (,$(OMIT_GNULIB_MODULE_canonicalize-lgpl)) 1495ifeq (,$(OMIT_GNULIB_MODULE_canonicalize-lgpl))
1434 1496
1435 1497ifneq (,$(GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION))
1436EXTRA_DIST += canonicalize-lgpl.c 1498libgnu_a_SOURCES += canonicalize-lgpl.c
1437 1499endif
1438EXTRA_libgnu_a_SOURCES += canonicalize-lgpl.c
1439 1500
1440endif 1501endif
1441## end gnulib module canonicalize-lgpl 1502## end gnulib module canonicalize-lgpl
@@ -1475,10 +1536,9 @@ endif
1475## begin gnulib module copy-file-range 1536## begin gnulib module copy-file-range
1476ifeq (,$(OMIT_GNULIB_MODULE_copy-file-range)) 1537ifeq (,$(OMIT_GNULIB_MODULE_copy-file-range))
1477 1538
1478 1539ifneq (,$(GL_COND_OBJ_COPY_FILE_RANGE_CONDITION))
1479EXTRA_DIST += copy-file-range.c 1540libgnu_a_SOURCES += copy-file-range.c
1480 1541endif
1481EXTRA_libgnu_a_SOURCES += copy-file-range.c
1482 1542
1483endif 1543endif
1484## end gnulib module copy-file-range 1544## end gnulib module copy-file-range
@@ -1621,13 +1681,12 @@ endif
1621ifeq (,$(OMIT_GNULIB_MODULE_dirfd)) 1681ifeq (,$(OMIT_GNULIB_MODULE_dirfd))
1622 1682
1623ifneq (,$(gl_GNULIB_ENABLED_dirfd_CONDITION)) 1683ifneq (,$(gl_GNULIB_ENABLED_dirfd_CONDITION))
1624 1684ifneq (,$(GL_COND_OBJ_DIRFD_CONDITION))
1685libgnu_a_SOURCES += dirfd.c
1625endif 1686endif
1626EXTRA_DIST += dirfd.c
1627
1628EXTRA_libgnu_a_SOURCES += dirfd.c
1629 1687
1630endif 1688endif
1689endif
1631## end gnulib module dirfd 1690## end gnulib module dirfd
1632 1691
1633## begin gnulib module dtoastr 1692## begin gnulib module dtoastr
@@ -1653,10 +1712,9 @@ endif
1653## begin gnulib module dup2 1712## begin gnulib module dup2
1654ifeq (,$(OMIT_GNULIB_MODULE_dup2)) 1713ifeq (,$(OMIT_GNULIB_MODULE_dup2))
1655 1714
1656 1715ifneq (,$(GL_COND_OBJ_DUP2_CONDITION))
1657EXTRA_DIST += dup2.c 1716libgnu_a_SOURCES += dup2.c
1658 1717endif
1659EXTRA_libgnu_a_SOURCES += dup2.c
1660 1718
1661endif 1719endif
1662## end gnulib module dup2 1720## end gnulib module dup2
@@ -1747,13 +1805,12 @@ endif
1747ifeq (,$(OMIT_GNULIB_MODULE_euidaccess)) 1805ifeq (,$(OMIT_GNULIB_MODULE_euidaccess))
1748 1806
1749ifneq (,$(gl_GNULIB_ENABLED_euidaccess_CONDITION)) 1807ifneq (,$(gl_GNULIB_ENABLED_euidaccess_CONDITION))
1750 1808ifneq (,$(GL_COND_OBJ_EUIDACCESS_CONDITION))
1809libgnu_a_SOURCES += euidaccess.c
1751endif 1810endif
1752EXTRA_DIST += euidaccess.c
1753
1754EXTRA_libgnu_a_SOURCES += euidaccess.c
1755 1811
1756endif 1812endif
1813endif
1757## end gnulib module euidaccess 1814## end gnulib module euidaccess
1758 1815
1759## begin gnulib module execinfo 1816## begin gnulib module execinfo
@@ -1773,9 +1830,11 @@ execinfo.h: $(top_builddir)/config.status
1773endif 1830endif
1774MOSTLYCLEANFILES += execinfo.h execinfo.h-t 1831MOSTLYCLEANFILES += execinfo.h execinfo.h-t
1775 1832
1776EXTRA_DIST += execinfo.c execinfo.in.h 1833ifneq (,$(GL_COND_OBJ_EXECINFO_CONDITION))
1834libgnu_a_SOURCES += execinfo.c
1835endif
1777 1836
1778EXTRA_libgnu_a_SOURCES += execinfo.c 1837EXTRA_DIST += execinfo.in.h
1779 1838
1780endif 1839endif
1781## end gnulib module execinfo 1840## end gnulib module execinfo
@@ -1783,10 +1842,9 @@ endif
1783## begin gnulib module explicit_bzero 1842## begin gnulib module explicit_bzero
1784ifeq (,$(OMIT_GNULIB_MODULE_explicit_bzero)) 1843ifeq (,$(OMIT_GNULIB_MODULE_explicit_bzero))
1785 1844
1786 1845ifneq (,$(GL_COND_OBJ_EXPLICIT_BZERO_CONDITION))
1787EXTRA_DIST += explicit_bzero.c 1846libgnu_a_SOURCES += explicit_bzero.c
1788 1847endif
1789EXTRA_libgnu_a_SOURCES += explicit_bzero.c
1790 1848
1791endif 1849endif
1792## end gnulib module explicit_bzero 1850## end gnulib module explicit_bzero
@@ -1794,10 +1852,13 @@ endif
1794## begin gnulib module faccessat 1852## begin gnulib module faccessat
1795ifeq (,$(OMIT_GNULIB_MODULE_faccessat)) 1853ifeq (,$(OMIT_GNULIB_MODULE_faccessat))
1796 1854
1855ifneq (,$(GL_COND_OBJ_FACCESSAT_CONDITION))
1856libgnu_a_SOURCES += faccessat.c
1857endif
1797 1858
1798EXTRA_DIST += at-func.c faccessat.c 1859EXTRA_DIST += at-func.c
1799 1860
1800EXTRA_libgnu_a_SOURCES += at-func.c faccessat.c 1861EXTRA_libgnu_a_SOURCES += at-func.c
1801 1862
1802endif 1863endif
1803## end gnulib module faccessat 1864## end gnulib module faccessat
@@ -1805,10 +1866,13 @@ endif
1805## begin gnulib module fchmodat 1866## begin gnulib module fchmodat
1806ifeq (,$(OMIT_GNULIB_MODULE_fchmodat)) 1867ifeq (,$(OMIT_GNULIB_MODULE_fchmodat))
1807 1868
1869ifneq (,$(GL_COND_OBJ_FCHMODAT_CONDITION))
1870libgnu_a_SOURCES += fchmodat.c
1871endif
1808 1872
1809EXTRA_DIST += at-func.c fchmodat.c 1873EXTRA_DIST += at-func.c
1810 1874
1811EXTRA_libgnu_a_SOURCES += at-func.c fchmodat.c 1875EXTRA_libgnu_a_SOURCES += at-func.c
1812 1876
1813endif 1877endif
1814## end gnulib module fchmodat 1878## end gnulib module fchmodat
@@ -1816,10 +1880,9 @@ endif
1816## begin gnulib module fcntl 1880## begin gnulib module fcntl
1817ifeq (,$(OMIT_GNULIB_MODULE_fcntl)) 1881ifeq (,$(OMIT_GNULIB_MODULE_fcntl))
1818 1882
1819 1883ifneq (,$(GL_COND_OBJ_FCNTL_CONDITION))
1820EXTRA_DIST += fcntl.c 1884libgnu_a_SOURCES += fcntl.c
1821 1885endif
1822EXTRA_libgnu_a_SOURCES += fcntl.c
1823 1886
1824endif 1887endif
1825## end gnulib module fcntl 1888## end gnulib module fcntl
@@ -1866,10 +1929,9 @@ endif
1866## begin gnulib module fdopendir 1929## begin gnulib module fdopendir
1867ifeq (,$(OMIT_GNULIB_MODULE_fdopendir)) 1930ifeq (,$(OMIT_GNULIB_MODULE_fdopendir))
1868 1931
1869 1932ifneq (,$(GL_COND_OBJ_FDOPENDIR_CONDITION))
1870EXTRA_DIST += fdopendir.c 1933libgnu_a_SOURCES += fdopendir.c
1871 1934endif
1872EXTRA_libgnu_a_SOURCES += fdopendir.c
1873 1935
1874endif 1936endif
1875## end gnulib module fdopendir 1937## end gnulib module fdopendir
@@ -1925,10 +1987,11 @@ endif
1925## begin gnulib module fpending 1987## begin gnulib module fpending
1926ifeq (,$(OMIT_GNULIB_MODULE_fpending)) 1988ifeq (,$(OMIT_GNULIB_MODULE_fpending))
1927 1989
1990ifneq (,$(GL_COND_OBJ_FPENDING_CONDITION))
1991libgnu_a_SOURCES += fpending.c
1992endif
1928 1993
1929EXTRA_DIST += fpending.c fpending.h stdio-impl.h 1994EXTRA_DIST += fpending.h stdio-impl.h
1930
1931EXTRA_libgnu_a_SOURCES += fpending.c
1932 1995
1933endif 1996endif
1934## end gnulib module fpending 1997## end gnulib module fpending
@@ -1936,10 +1999,9 @@ endif
1936## begin gnulib module free-posix 1999## begin gnulib module free-posix
1937ifeq (,$(OMIT_GNULIB_MODULE_free-posix)) 2000ifeq (,$(OMIT_GNULIB_MODULE_free-posix))
1938 2001
1939 2002ifneq (,$(GL_COND_OBJ_FREE_CONDITION))
1940EXTRA_DIST += free.c 2003libgnu_a_SOURCES += free.c
1941 2004endif
1942EXTRA_libgnu_a_SOURCES += free.c
1943 2005
1944endif 2006endif
1945## end gnulib module free-posix 2007## end gnulib module free-posix
@@ -1947,10 +2009,13 @@ endif
1947## begin gnulib module fstatat 2009## begin gnulib module fstatat
1948ifeq (,$(OMIT_GNULIB_MODULE_fstatat)) 2010ifeq (,$(OMIT_GNULIB_MODULE_fstatat))
1949 2011
2012ifneq (,$(GL_COND_OBJ_FSTATAT_CONDITION))
2013libgnu_a_SOURCES += fstatat.c
2014endif
1950 2015
1951EXTRA_DIST += at-func.c fstatat.c 2016EXTRA_DIST += at-func.c
1952 2017
1953EXTRA_libgnu_a_SOURCES += at-func.c fstatat.c 2018EXTRA_libgnu_a_SOURCES += at-func.c
1954 2019
1955endif 2020endif
1956## end gnulib module fstatat 2021## end gnulib module fstatat
@@ -1958,10 +2023,11 @@ endif
1958## begin gnulib module fsusage 2023## begin gnulib module fsusage
1959ifeq (,$(OMIT_GNULIB_MODULE_fsusage)) 2024ifeq (,$(OMIT_GNULIB_MODULE_fsusage))
1960 2025
2026ifneq (,$(GL_COND_OBJ_FSUSAGE_CONDITION))
2027libgnu_a_SOURCES += fsusage.c
2028endif
1961 2029
1962EXTRA_DIST += fsusage.c fsusage.h 2030EXTRA_DIST += fsusage.h
1963
1964EXTRA_libgnu_a_SOURCES += fsusage.c
1965 2031
1966endif 2032endif
1967## end gnulib module fsusage 2033## end gnulib module fsusage
@@ -1969,10 +2035,9 @@ endif
1969## begin gnulib module fsync 2035## begin gnulib module fsync
1970ifeq (,$(OMIT_GNULIB_MODULE_fsync)) 2036ifeq (,$(OMIT_GNULIB_MODULE_fsync))
1971 2037
1972 2038ifneq (,$(GL_COND_OBJ_FSYNC_CONDITION))
1973EXTRA_DIST += fsync.c 2039libgnu_a_SOURCES += fsync.c
1974 2040endif
1975EXTRA_libgnu_a_SOURCES += fsync.c
1976 2041
1977endif 2042endif
1978## end gnulib module fsync 2043## end gnulib module fsync
@@ -1980,10 +2045,9 @@ endif
1980## begin gnulib module futimens 2045## begin gnulib module futimens
1981ifeq (,$(OMIT_GNULIB_MODULE_futimens)) 2046ifeq (,$(OMIT_GNULIB_MODULE_futimens))
1982 2047
1983 2048ifneq (,$(GL_COND_OBJ_FUTIMENS_CONDITION))
1984EXTRA_DIST += futimens.c 2049libgnu_a_SOURCES += futimens.c
1985 2050endif
1986EXTRA_libgnu_a_SOURCES += futimens.c
1987 2051
1988endif 2052endif
1989## end gnulib module futimens 2053## end gnulib module futimens
@@ -2013,35 +2077,32 @@ endif
2013ifeq (,$(OMIT_GNULIB_MODULE_getdtablesize)) 2077ifeq (,$(OMIT_GNULIB_MODULE_getdtablesize))
2014 2078
2015ifneq (,$(gl_GNULIB_ENABLED_getdtablesize_CONDITION)) 2079ifneq (,$(gl_GNULIB_ENABLED_getdtablesize_CONDITION))
2016 2080ifneq (,$(GL_COND_OBJ_GETDTABLESIZE_CONDITION))
2081libgnu_a_SOURCES += getdtablesize.c
2017endif 2082endif
2018EXTRA_DIST += getdtablesize.c
2019
2020EXTRA_libgnu_a_SOURCES += getdtablesize.c
2021 2083
2022endif 2084endif
2085endif
2023## end gnulib module getdtablesize 2086## end gnulib module getdtablesize
2024 2087
2025## begin gnulib module getgroups 2088## begin gnulib module getgroups
2026ifeq (,$(OMIT_GNULIB_MODULE_getgroups)) 2089ifeq (,$(OMIT_GNULIB_MODULE_getgroups))
2027 2090
2028ifneq (,$(gl_GNULIB_ENABLED_getgroups_CONDITION)) 2091ifneq (,$(gl_GNULIB_ENABLED_getgroups_CONDITION))
2029 2092ifneq (,$(GL_COND_OBJ_GETGROUPS_CONDITION))
2093libgnu_a_SOURCES += getgroups.c
2030endif 2094endif
2031EXTRA_DIST += getgroups.c
2032
2033EXTRA_libgnu_a_SOURCES += getgroups.c
2034 2095
2035endif 2096endif
2097endif
2036## end gnulib module getgroups 2098## end gnulib module getgroups
2037 2099
2038## begin gnulib module getloadavg 2100## begin gnulib module getloadavg
2039ifeq (,$(OMIT_GNULIB_MODULE_getloadavg)) 2101ifeq (,$(OMIT_GNULIB_MODULE_getloadavg))
2040 2102
2041 2103ifneq (,$(GL_COND_OBJ_GETLOADAVG_CONDITION))
2042EXTRA_DIST += getloadavg.c 2104libgnu_a_SOURCES += getloadavg.c
2043 2105endif
2044EXTRA_libgnu_a_SOURCES += getloadavg.c
2045 2106
2046endif 2107endif
2047## end gnulib module getloadavg 2108## end gnulib module getloadavg
@@ -2083,9 +2144,11 @@ endif
2083 2144
2084MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t 2145MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t
2085 2146
2086EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.c getopt.in.h getopt1.c getopt_int.h 2147ifneq (,$(GL_COND_OBJ_GETOPT_CONDITION))
2148libgnu_a_SOURCES += getopt.c getopt1.c
2149endif
2087 2150
2088EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c 2151EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.in.h getopt_int.h
2089 2152
2090endif 2153endif
2091## end gnulib module getopt-posix 2154## end gnulib module getopt-posix
@@ -2093,10 +2156,9 @@ endif
2093## begin gnulib module getrandom 2156## begin gnulib module getrandom
2094ifeq (,$(OMIT_GNULIB_MODULE_getrandom)) 2157ifeq (,$(OMIT_GNULIB_MODULE_getrandom))
2095 2158
2096 2159ifneq (,$(GL_COND_OBJ_GETRANDOM_CONDITION))
2097EXTRA_DIST += getrandom.c 2160libgnu_a_SOURCES += getrandom.c
2098 2161endif
2099EXTRA_libgnu_a_SOURCES += getrandom.c
2100 2162
2101endif 2163endif
2102## end gnulib module getrandom 2164## end gnulib module getrandom
@@ -2122,10 +2184,9 @@ endif
2122## begin gnulib module gettimeofday 2184## begin gnulib module gettimeofday
2123ifeq (,$(OMIT_GNULIB_MODULE_gettimeofday)) 2185ifeq (,$(OMIT_GNULIB_MODULE_gettimeofday))
2124 2186
2125 2187ifneq (,$(GL_COND_OBJ_GETTIMEOFDAY_CONDITION))
2126EXTRA_DIST += gettimeofday.c 2188libgnu_a_SOURCES += gettimeofday.c
2127 2189endif
2128EXTRA_libgnu_a_SOURCES += gettimeofday.c
2129 2190
2130endif 2191endif
2131## end gnulib module gettimeofday 2192## end gnulib module gettimeofday
@@ -2143,13 +2204,12 @@ endif
2143ifeq (,$(OMIT_GNULIB_MODULE_group-member)) 2204ifeq (,$(OMIT_GNULIB_MODULE_group-member))
2144 2205
2145ifneq (,$(gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_CONDITION)) 2206ifneq (,$(gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_CONDITION))
2146 2207ifneq (,$(GL_COND_OBJ_GROUP_MEMBER_CONDITION))
2208libgnu_a_SOURCES += group-member.c
2147endif 2209endif
2148EXTRA_DIST += group-member.c
2149
2150EXTRA_libgnu_a_SOURCES += group-member.c
2151 2210
2152endif 2211endif
2212endif
2153## end gnulib module group-member 2213## end gnulib module group-member
2154 2214
2155## begin gnulib module idx 2215## begin gnulib module idx
@@ -2249,13 +2309,12 @@ endif
2249ifeq (,$(OMIT_GNULIB_MODULE_lchmod)) 2309ifeq (,$(OMIT_GNULIB_MODULE_lchmod))
2250 2310
2251ifneq (,$(gl_GNULIB_ENABLED_lchmod_CONDITION)) 2311ifneq (,$(gl_GNULIB_ENABLED_lchmod_CONDITION))
2252 2312ifneq (,$(GL_COND_OBJ_LCHMOD_CONDITION))
2313libgnu_a_SOURCES += lchmod.c
2253endif 2314endif
2254EXTRA_DIST += lchmod.c
2255
2256EXTRA_libgnu_a_SOURCES += lchmod.c
2257 2315
2258endif 2316endif
2317endif
2259## end gnulib module lchmod 2318## end gnulib module lchmod
2260 2319
2261## begin gnulib module libc-config 2320## begin gnulib module libc-config
@@ -2291,9 +2350,13 @@ gmp.h: $(top_builddir)/config.status
2291endif 2350endif
2292MOSTLYCLEANFILES += gmp.h gmp.h-t 2351MOSTLYCLEANFILES += gmp.h gmp.h-t
2293 2352
2294EXTRA_DIST += mini-gmp-gnulib.c mini-gmp.c mini-gmp.h 2353ifneq (,$(GL_COND_OBJ_MINI_GMP_GNULIB_CONDITION))
2354libgnu_a_SOURCES += mini-gmp-gnulib.c
2355endif
2356
2357EXTRA_DIST += mini-gmp.c mini-gmp.h
2295 2358
2296EXTRA_libgnu_a_SOURCES += mini-gmp-gnulib.c mini-gmp.c 2359EXTRA_libgnu_a_SOURCES += mini-gmp.c
2297 2360
2298endif 2361endif
2299## end gnulib module libgmp 2362## end gnulib module libgmp
@@ -2329,10 +2392,9 @@ endif
2329## begin gnulib module lstat 2392## begin gnulib module lstat
2330ifeq (,$(OMIT_GNULIB_MODULE_lstat)) 2393ifeq (,$(OMIT_GNULIB_MODULE_lstat))
2331 2394
2332 2395ifneq (,$(GL_COND_OBJ_LSTAT_CONDITION))
2333EXTRA_DIST += lstat.c 2396libgnu_a_SOURCES += lstat.c
2334 2397endif
2335EXTRA_libgnu_a_SOURCES += lstat.c
2336 2398
2337endif 2399endif
2338## end gnulib module lstat 2400## end gnulib module lstat
@@ -2377,10 +2439,9 @@ endif
2377## begin gnulib module mempcpy 2439## begin gnulib module mempcpy
2378ifeq (,$(OMIT_GNULIB_MODULE_mempcpy)) 2440ifeq (,$(OMIT_GNULIB_MODULE_mempcpy))
2379 2441
2380 2442ifneq (,$(GL_COND_OBJ_MEMPCPY_CONDITION))
2381EXTRA_DIST += mempcpy.c 2443libgnu_a_SOURCES += mempcpy.c
2382 2444endif
2383EXTRA_libgnu_a_SOURCES += mempcpy.c
2384 2445
2385endif 2446endif
2386## end gnulib module mempcpy 2447## end gnulib module mempcpy
@@ -2388,10 +2449,9 @@ endif
2388## begin gnulib module memrchr 2449## begin gnulib module memrchr
2389ifeq (,$(OMIT_GNULIB_MODULE_memrchr)) 2450ifeq (,$(OMIT_GNULIB_MODULE_memrchr))
2390 2451
2391 2452ifneq (,$(GL_COND_OBJ_MEMRCHR_CONDITION))
2392EXTRA_DIST += memrchr.c 2453libgnu_a_SOURCES += memrchr.c
2393 2454endif
2394EXTRA_libgnu_a_SOURCES += memrchr.c
2395 2455
2396endif 2456endif
2397## end gnulib module memrchr 2457## end gnulib module memrchr
@@ -2407,10 +2467,9 @@ endif
2407## begin gnulib module mkostemp 2467## begin gnulib module mkostemp
2408ifeq (,$(OMIT_GNULIB_MODULE_mkostemp)) 2468ifeq (,$(OMIT_GNULIB_MODULE_mkostemp))
2409 2469
2410 2470ifneq (,$(GL_COND_OBJ_MKOSTEMP_CONDITION))
2411EXTRA_DIST += mkostemp.c 2471libgnu_a_SOURCES += mkostemp.c
2412 2472endif
2413EXTRA_libgnu_a_SOURCES += mkostemp.c
2414 2473
2415endif 2474endif
2416## end gnulib module mkostemp 2475## end gnulib module mkostemp
@@ -2463,13 +2522,12 @@ endif
2463ifeq (,$(OMIT_GNULIB_MODULE_open)) 2522ifeq (,$(OMIT_GNULIB_MODULE_open))
2464 2523
2465ifneq (,$(gl_GNULIB_ENABLED_open_CONDITION)) 2524ifneq (,$(gl_GNULIB_ENABLED_open_CONDITION))
2466 2525ifneq (,$(GL_COND_OBJ_OPEN_CONDITION))
2526libgnu_a_SOURCES += open.c
2467endif 2527endif
2468EXTRA_DIST += open.c
2469
2470EXTRA_libgnu_a_SOURCES += open.c
2471 2528
2472endif 2529endif
2530endif
2473## end gnulib module open 2531## end gnulib module open
2474 2532
2475## begin gnulib module openat-h 2533## begin gnulib module openat-h
@@ -2503,10 +2561,9 @@ endif
2503## begin gnulib module pselect 2561## begin gnulib module pselect
2504ifeq (,$(OMIT_GNULIB_MODULE_pselect)) 2562ifeq (,$(OMIT_GNULIB_MODULE_pselect))
2505 2563
2506 2564ifneq (,$(GL_COND_OBJ_PSELECT_CONDITION))
2507EXTRA_DIST += pselect.c 2565libgnu_a_SOURCES += pselect.c
2508 2566endif
2509EXTRA_libgnu_a_SOURCES += pselect.c
2510 2567
2511endif 2568endif
2512## end gnulib module pselect 2569## end gnulib module pselect
@@ -2514,10 +2571,9 @@ endif
2514## begin gnulib module pthread_sigmask 2571## begin gnulib module pthread_sigmask
2515ifeq (,$(OMIT_GNULIB_MODULE_pthread_sigmask)) 2572ifeq (,$(OMIT_GNULIB_MODULE_pthread_sigmask))
2516 2573
2517 2574ifneq (,$(GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION))
2518EXTRA_DIST += pthread_sigmask.c 2575libgnu_a_SOURCES += pthread_sigmask.c
2519 2576endif
2520EXTRA_libgnu_a_SOURCES += pthread_sigmask.c
2521 2577
2522endif 2578endif
2523## end gnulib module pthread_sigmask 2579## end gnulib module pthread_sigmask
@@ -2534,11 +2590,12 @@ endif
2534ifeq (,$(OMIT_GNULIB_MODULE_rawmemchr)) 2590ifeq (,$(OMIT_GNULIB_MODULE_rawmemchr))
2535 2591
2536ifneq (,$(gl_GNULIB_ENABLED_rawmemchr_CONDITION)) 2592ifneq (,$(gl_GNULIB_ENABLED_rawmemchr_CONDITION))
2537 2593ifneq (,$(GL_COND_OBJ_RAWMEMCHR_CONDITION))
2594libgnu_a_SOURCES += rawmemchr.c
2538endif 2595endif
2539EXTRA_DIST += rawmemchr.c rawmemchr.valgrind
2540 2596
2541EXTRA_libgnu_a_SOURCES += rawmemchr.c 2597endif
2598EXTRA_DIST += rawmemchr.valgrind
2542 2599
2543endif 2600endif
2544## end gnulib module rawmemchr 2601## end gnulib module rawmemchr
@@ -2546,10 +2603,9 @@ endif
2546## begin gnulib module readlink 2603## begin gnulib module readlink
2547ifeq (,$(OMIT_GNULIB_MODULE_readlink)) 2604ifeq (,$(OMIT_GNULIB_MODULE_readlink))
2548 2605
2549 2606ifneq (,$(GL_COND_OBJ_READLINK_CONDITION))
2550EXTRA_DIST += readlink.c 2607libgnu_a_SOURCES += readlink.c
2551 2608endif
2552EXTRA_libgnu_a_SOURCES += readlink.c
2553 2609
2554endif 2610endif
2555## end gnulib module readlink 2611## end gnulib module readlink
@@ -2557,10 +2613,13 @@ endif
2557## begin gnulib module readlinkat 2613## begin gnulib module readlinkat
2558ifeq (,$(OMIT_GNULIB_MODULE_readlinkat)) 2614ifeq (,$(OMIT_GNULIB_MODULE_readlinkat))
2559 2615
2616ifneq (,$(GL_COND_OBJ_READLINKAT_CONDITION))
2617libgnu_a_SOURCES += readlinkat.c
2618endif
2560 2619
2561EXTRA_DIST += at-func.c readlinkat.c 2620EXTRA_DIST += at-func.c
2562 2621
2563EXTRA_libgnu_a_SOURCES += at-func.c readlinkat.c 2622EXTRA_libgnu_a_SOURCES += at-func.c
2564 2623
2565endif 2624endif
2566## end gnulib module readlinkat 2625## end gnulib module readlinkat
@@ -2594,10 +2653,13 @@ endif
2594## begin gnulib module regex 2653## begin gnulib module regex
2595ifeq (,$(OMIT_GNULIB_MODULE_regex)) 2654ifeq (,$(OMIT_GNULIB_MODULE_regex))
2596 2655
2656ifneq (,$(GL_COND_OBJ_REGEX_CONDITION))
2657libgnu_a_SOURCES += regex.c
2658endif
2597 2659
2598EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c 2660EXTRA_DIST += regcomp.c regex.h regex_internal.c regex_internal.h regexec.c
2599 2661
2600EXTRA_libgnu_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c 2662EXTRA_libgnu_a_SOURCES += regcomp.c regex_internal.c regexec.c
2601 2663
2602endif 2664endif
2603## end gnulib module regex 2665## end gnulib module regex
@@ -2641,10 +2703,11 @@ endif
2641## begin gnulib module sig2str 2703## begin gnulib module sig2str
2642ifeq (,$(OMIT_GNULIB_MODULE_sig2str)) 2704ifeq (,$(OMIT_GNULIB_MODULE_sig2str))
2643 2705
2706ifneq (,$(GL_COND_OBJ_SIG2STR_CONDITION))
2707libgnu_a_SOURCES += sig2str.c
2708endif
2644 2709
2645EXTRA_DIST += sig2str.c sig2str.h 2710EXTRA_DIST += sig2str.h
2646
2647EXTRA_libgnu_a_SOURCES += sig2str.c
2648 2711
2649endif 2712endif
2650## end gnulib module sig2str 2713## end gnulib module sig2str
@@ -2652,10 +2715,9 @@ endif
2652## begin gnulib module sigdescr_np 2715## begin gnulib module sigdescr_np
2653ifeq (,$(OMIT_GNULIB_MODULE_sigdescr_np)) 2716ifeq (,$(OMIT_GNULIB_MODULE_sigdescr_np))
2654 2717
2655 2718ifneq (,$(GL_COND_OBJ_SIGDESCR_NP_CONDITION))
2656EXTRA_DIST += sigdescr_np.c 2719libgnu_a_SOURCES += sigdescr_np.c
2657 2720endif
2658EXTRA_libgnu_a_SOURCES += sigdescr_np.c
2659 2721
2660endif 2722endif
2661## end gnulib module sigdescr_np 2723## end gnulib module sigdescr_np
@@ -3004,6 +3066,13 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
3004 $(AM_V_at)mv $@-t $@ 3066 $(AM_V_at)mv $@-t $@
3005MOSTLYCLEANFILES += stdio.h stdio.h-t 3067MOSTLYCLEANFILES += stdio.h stdio.h-t
3006 3068
3069ifneq (,$(GL_COND_OBJ_STDIO_READ_CONDITION))
3070libgnu_a_SOURCES += stdio-read.c
3071endif
3072ifneq (,$(GL_COND_OBJ_STDIO_WRITE_CONDITION))
3073libgnu_a_SOURCES += stdio-write.c
3074endif
3075
3007EXTRA_DIST += stdio.in.h 3076EXTRA_DIST += stdio.in.h
3008 3077
3009endif 3078endif
@@ -3163,10 +3232,9 @@ endif
3163## begin gnulib module stpcpy 3232## begin gnulib module stpcpy
3164ifeq (,$(OMIT_GNULIB_MODULE_stpcpy)) 3233ifeq (,$(OMIT_GNULIB_MODULE_stpcpy))
3165 3234
3166 3235ifneq (,$(GL_COND_OBJ_STPCPY_CONDITION))
3167EXTRA_DIST += stpcpy.c 3236libgnu_a_SOURCES += stpcpy.c
3168 3237endif
3169EXTRA_libgnu_a_SOURCES += stpcpy.c
3170 3238
3171endif 3239endif
3172## end gnulib module stpcpy 3240## end gnulib module stpcpy
@@ -3287,10 +3355,9 @@ endif
3287## begin gnulib module strnlen 3355## begin gnulib module strnlen
3288ifeq (,$(OMIT_GNULIB_MODULE_strnlen)) 3356ifeq (,$(OMIT_GNULIB_MODULE_strnlen))
3289 3357
3290 3358ifneq (,$(GL_COND_OBJ_STRNLEN_CONDITION))
3291EXTRA_DIST += strnlen.c 3359libgnu_a_SOURCES += strnlen.c
3292 3360endif
3293EXTRA_libgnu_a_SOURCES += strnlen.c
3294 3361
3295endif 3362endif
3296## end gnulib module strnlen 3363## end gnulib module strnlen
@@ -3298,10 +3365,9 @@ endif
3298## begin gnulib module strtoimax 3365## begin gnulib module strtoimax
3299ifeq (,$(OMIT_GNULIB_MODULE_strtoimax)) 3366ifeq (,$(OMIT_GNULIB_MODULE_strtoimax))
3300 3367
3301 3368ifneq (,$(GL_COND_OBJ_STRTOIMAX_CONDITION))
3302EXTRA_DIST += strtoimax.c 3369libgnu_a_SOURCES += strtoimax.c
3303 3370endif
3304EXTRA_libgnu_a_SOURCES += strtoimax.c
3305 3371
3306endif 3372endif
3307## end gnulib module strtoimax 3373## end gnulib module strtoimax
@@ -3310,11 +3376,14 @@ endif
3310ifeq (,$(OMIT_GNULIB_MODULE_strtoll)) 3376ifeq (,$(OMIT_GNULIB_MODULE_strtoll))
3311 3377
3312ifneq (,$(gl_GNULIB_ENABLED_strtoll_CONDITION)) 3378ifneq (,$(gl_GNULIB_ENABLED_strtoll_CONDITION))
3379ifneq (,$(GL_COND_OBJ_STRTOLL_CONDITION))
3380libgnu_a_SOURCES += strtoll.c
3381endif
3313 3382
3314endif 3383endif
3315EXTRA_DIST += strtol.c strtoll.c 3384EXTRA_DIST += strtol.c
3316 3385
3317EXTRA_libgnu_a_SOURCES += strtol.c strtoll.c 3386EXTRA_libgnu_a_SOURCES += strtol.c
3318 3387
3319endif 3388endif
3320## end gnulib module strtoll 3389## end gnulib module strtoll
@@ -3322,10 +3391,9 @@ endif
3322## begin gnulib module symlink 3391## begin gnulib module symlink
3323ifeq (,$(OMIT_GNULIB_MODULE_symlink)) 3392ifeq (,$(OMIT_GNULIB_MODULE_symlink))
3324 3393
3325 3394ifneq (,$(GL_COND_OBJ_SYMLINK_CONDITION))
3326EXTRA_DIST += symlink.c 3395libgnu_a_SOURCES += symlink.c
3327 3396endif
3328EXTRA_libgnu_a_SOURCES += symlink.c
3329 3397
3330endif 3398endif
3331## end gnulib module symlink 3399## end gnulib module symlink
@@ -3602,10 +3670,9 @@ endif
3602## begin gnulib module time_r 3670## begin gnulib module time_r
3603ifeq (,$(OMIT_GNULIB_MODULE_time_r)) 3671ifeq (,$(OMIT_GNULIB_MODULE_time_r))
3604 3672
3605 3673ifneq (,$(GL_COND_OBJ_TIME_R_CONDITION))
3606EXTRA_DIST += time_r.c 3674libgnu_a_SOURCES += time_r.c
3607 3675endif
3608EXTRA_libgnu_a_SOURCES += time_r.c
3609 3676
3610endif 3677endif
3611## end gnulib module time_r 3678## end gnulib module time_r
@@ -3613,10 +3680,11 @@ endif
3613## begin gnulib module time_rz 3680## begin gnulib module time_rz
3614ifeq (,$(OMIT_GNULIB_MODULE_time_rz)) 3681ifeq (,$(OMIT_GNULIB_MODULE_time_rz))
3615 3682
3683ifneq (,$(GL_COND_OBJ_TIME_RZ_CONDITION))
3684libgnu_a_SOURCES += time_rz.c
3685endif
3616 3686
3617EXTRA_DIST += time-internal.h time_rz.c 3687EXTRA_DIST += time-internal.h
3618
3619EXTRA_libgnu_a_SOURCES += time_rz.c
3620 3688
3621endif 3689endif
3622## end gnulib module time_rz 3690## end gnulib module time_rz
@@ -3624,10 +3692,11 @@ endif
3624## begin gnulib module timegm 3692## begin gnulib module timegm
3625ifeq (,$(OMIT_GNULIB_MODULE_timegm)) 3693ifeq (,$(OMIT_GNULIB_MODULE_timegm))
3626 3694
3695ifneq (,$(GL_COND_OBJ_TIMEGM_CONDITION))
3696libgnu_a_SOURCES += timegm.c
3697endif
3627 3698
3628EXTRA_DIST += mktime-internal.h timegm.c 3699EXTRA_DIST += mktime-internal.h
3629
3630EXTRA_libgnu_a_SOURCES += timegm.c
3631 3700
3632endif 3701endif
3633## end gnulib module timegm 3702## end gnulib module timegm
@@ -3821,6 +3890,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
3821 sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \ 3890 sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
3822 -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ 3891 -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
3823 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ 3892 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
3893 -e 's|@''REPLACE_COPY_FILE_RANGE''@|$(REPLACE_COPY_FILE_RANGE)|g' \
3824 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ 3894 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
3825 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ 3895 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
3826 -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \ 3896 -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
@@ -3909,10 +3979,13 @@ endif
3909## begin gnulib module utimensat 3979## begin gnulib module utimensat
3910ifeq (,$(OMIT_GNULIB_MODULE_utimensat)) 3980ifeq (,$(OMIT_GNULIB_MODULE_utimensat))
3911 3981
3982ifneq (,$(GL_COND_OBJ_UTIMENSAT_CONDITION))
3983libgnu_a_SOURCES += utimensat.c
3984endif
3912 3985
3913EXTRA_DIST += at-func.c utimensat.c 3986EXTRA_DIST += at-func.c
3914 3987
3915EXTRA_libgnu_a_SOURCES += at-func.c utimensat.c 3988EXTRA_libgnu_a_SOURCES += at-func.c
3916 3989
3917endif 3990endif
3918## end gnulib module utimensat 3991## end gnulib module utimensat
@@ -3954,3 +4027,7 @@ mostlyclean-local: mostlyclean-generic
3954 fi; \ 4027 fi; \
3955 done; \ 4028 done; \
3956 : 4029 :
4030distclean-local: distclean-gnulib-libobjs
4031distclean-gnulib-libobjs:
4032 -rm -f @gl_LIBOBJDEPS@
4033maintainer-clean-local: distclean-gnulib-libobjs
diff --git a/lib/intprops.h b/lib/intprops.h
index 68d6daa5706..d4a917f72a0 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -229,11 +229,15 @@
229 229
230/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow 230/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
231 (A, B, P) work when P is non-null. */ 231 (A, B, P) work when P is non-null. */
232#if defined __has_builtin 232#ifdef __EDG__
233/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned
234 <https://bugs.gnu.org/53256>. */
235# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
236#elif defined __has_builtin
233# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow) 237# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
234/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x, 238/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
235 see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */ 239 see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */
236#elif 7 <= __GNUC__ && !defined __EDG__ 240#elif 7 <= __GNUC__
237# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1 241# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
238#else 242#else
239# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0 243# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
diff --git a/lib/lchmod.c b/lib/lchmod.c
index 479ed776cba..706dddff7bb 100644
--- a/lib/lchmod.c
+++ b/lib/lchmod.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/memrchr.c b/lib/memrchr.c
index e853996ad0a..90fdb86f1f1 100644
--- a/lib/memrchr.c
+++ b/lib/memrchr.c
@@ -11,7 +11,7 @@
11 11
12 This file is free software: you can redistribute it and/or modify 12 This file is free software: you can redistribute it and/or modify
13 it under the terms of the GNU Lesser General Public License as 13 it under the terms of the GNU Lesser General Public License as
14 published by the Free Software Foundation; either version 3 of the 14 published by the Free Software Foundation, either version 3 of the
15 License, or (at your option) any later version. 15 License, or (at your option) any later version.
16 16
17 This file is distributed in the hope that it will be useful, 17 This file is distributed in the hope that it will be useful,
diff --git a/lib/mini-gmp-gnulib.c b/lib/mini-gmp-gnulib.c
index 7620da38dbb..a18ee8f6ab7 100644
--- a/lib/mini-gmp-gnulib.c
+++ b/lib/mini-gmp-gnulib.c
@@ -6,7 +6,7 @@
6 It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". 6 It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
7 You can redistribute it and/or modify it under either 7 You can redistribute it and/or modify it under either
8 - the terms of the GNU Lesser General Public License as published 8 - the terms of the GNU Lesser General Public License as published
9 by the Free Software Foundation; either version 3, or (at your 9 by the Free Software Foundation, either version 3, or (at your
10 option) any later version, or 10 option) any later version, or
11 - the terms of the GNU General Public License as published by the 11 - the terms of the GNU General Public License as published by the
12 Free Software Foundation; either version 2, or (at your option) 12 Free Software Foundation; either version 2, or (at your option)
diff --git a/lib/mini-gmp.c b/lib/mini-gmp.c
index 8577b59ef6d..e7a320a6420 100644
--- a/lib/mini-gmp.c
+++ b/lib/mini-gmp.c
@@ -10,7 +10,7 @@ The GNU MP Library is free software; you can redistribute it and/or modify
10it under the terms of either: 10it under the terms of either:
11 11
12 * the GNU Lesser General Public License as published by the Free 12 * the GNU Lesser General Public License as published by the Free
13 Software Foundation; either version 3 of the License, or (at your 13 Software Foundation, either version 3 of the License, or (at your
14 option) any later version. 14 option) any later version.
15 15
16or 16or
diff --git a/lib/mini-gmp.h b/lib/mini-gmp.h
index 59c24cf5111..508712d235b 100644
--- a/lib/mini-gmp.h
+++ b/lib/mini-gmp.h
@@ -8,7 +8,7 @@ The GNU MP Library is free software; you can redistribute it and/or modify
8it under the terms of either: 8it under the terms of either:
9 9
10 * the GNU Lesser General Public License as published by the Free 10 * the GNU Lesser General Public License as published by the Free
11 Software Foundation; either version 3 of the License, or (at your 11 Software Foundation, either version 3 of the License, or (at your
12 option) any later version. 12 option) any later version.
13 13
14or 14or
diff --git a/lib/mktime.c b/lib/mktime.c
index aa12e28e168..7dc9d67ef9d 100644
--- a/lib/mktime.c
+++ b/lib/mktime.c
@@ -429,8 +429,13 @@ __mktime_internal (struct tm *tp,
429 time with the right value, and use its UTC offset. 429 time with the right value, and use its UTC offset.
430 430
431 Heuristic: probe the adjacent timestamps in both directions, 431 Heuristic: probe the adjacent timestamps in both directions,
432 looking for the desired isdst. This should work for all real 432 looking for the desired isdst. If none is found within a
433 time zone histories in the tz database. */ 433 reasonable duration bound, assume a one-hour DST difference.
434 This should work for all real time zone histories in the tz
435 database. */
436
437 /* +1 if we wanted standard time but got DST, -1 if the reverse. */
438 int dst_difference = (isdst == 0) - (tm.tm_isdst == 0);
434 439
435 /* Distance between probes when looking for a DST boundary. In 440 /* Distance between probes when looking for a DST boundary. In
436 tzdata2003a, the shortest period of DST is 601200 seconds 441 tzdata2003a, the shortest period of DST is 601200 seconds
@@ -441,12 +446,14 @@ __mktime_internal (struct tm *tp,
441 periods when probing. */ 446 periods when probing. */
442 int stride = 601200; 447 int stride = 601200;
443 448
444 /* The longest period of DST in tzdata2003a is 536454000 seconds 449 /* In TZDB 2021e, the longest period of DST (or of non-DST), in
445 (e.g., America/Jujuy starting 1946-10-01 01:00). The longest 450 which the DST (or adjacent DST) difference is not one hour,
446 period of non-DST is much longer, but it makes no real sense 451 is 457243209 seconds: e.g., America/Cambridge_Bay with leap
447 to search for more than a year of non-DST, so use the DST 452 seconds, starting 1965-10-31 00:00 in a switch from
448 max. */ 453 double-daylight time (-05) to standard time (-07), and
449 int duration_max = 536454000; 454 continuing to 1980-04-27 02:00 in a switch from standard time
455 (-07) to daylight time (-06). */
456 int duration_max = 457243209;
450 457
451 /* Search in both directions, so the maximum distance is half 458 /* Search in both directions, so the maximum distance is half
452 the duration; add the stride to avoid off-by-1 problems. */ 459 the duration; add the stride to avoid off-by-1 problems. */
@@ -483,6 +490,11 @@ __mktime_internal (struct tm *tp,
483 } 490 }
484 } 491 }
485 492
493 /* No unusual DST offset was found nearby. Assume one-hour DST. */
494 t += 60 * 60 * dst_difference;
495 if (mktime_min <= t && t <= mktime_max && convert_time (convert, t, &tm))
496 goto offset_found;
497
486 __set_errno (EOVERFLOW); 498 __set_errno (EOVERFLOW);
487 return -1; 499 return -1;
488 } 500 }
diff --git a/lib/nstrftime.c b/lib/nstrftime.c
index 190ff4d8f20..c1dd5542478 100644
--- a/lib/nstrftime.c
+++ b/lib/nstrftime.c
@@ -3,7 +3,7 @@
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 3 of the 6 published by the Free Software Foundation, either version 3 of the
7 License, or (at your option) any later version. 7 License, or (at your option) any later version.
8 8
9 This file is distributed in the hope that it will be useful, 9 This file is distributed in the hope that it will be useful,
@@ -1158,7 +1158,6 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
1158 1158
1159 case L_('q'): /* GNU extension. */ 1159 case L_('q'): /* GNU extension. */
1160 DO_SIGNED_NUMBER (1, false, ((tp->tm_mon * 11) >> 5) + 1); 1160 DO_SIGNED_NUMBER (1, false, ((tp->tm_mon * 11) >> 5) + 1);
1161 break;
1162 1161
1163 case L_('R'): 1162 case L_('R'):
1164 subfmt = L_("%H:%M"); 1163 subfmt = L_("%H:%M");
diff --git a/lib/openat-priv.h b/lib/openat-priv.h
index 451cac10cc6..5d60810709d 100644
--- a/lib/openat-priv.h
+++ b/lib/openat-priv.h
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/openat-proc.c b/lib/openat-proc.c
index d5f4296d478..3bacf7dbd13 100644
--- a/lib/openat-proc.c
+++ b/lib/openat-proc.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/openat.h b/lib/openat.h
index dcb2864ffc8..5c8ff90b804 100644
--- a/lib/openat.h
+++ b/lib/openat.h
@@ -3,7 +3,7 @@
3 3
4 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
5 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
6 the Free Software Foundation; either version 3 of the License, or 6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version. 7 (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c
index 42ae68ffc1d..37fb179260d 100644
--- a/lib/qcopy-acl.c
+++ b/lib/qcopy-acl.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/readlinkat.c b/lib/readlinkat.c
index f3d39604d2e..ab45e140b59 100644
--- a/lib/readlinkat.c
+++ b/lib/readlinkat.c
@@ -3,7 +3,7 @@
3 3
4 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
5 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
6 the Free Software Foundation; either version 3 of the License, or 6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version. 7 (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
diff --git a/lib/save-cwd.h b/lib/save-cwd.h
index 7aa124c42f8..90e8a0747ce 100644
--- a/lib/save-cwd.h
+++ b/lib/save-cwd.h
@@ -5,7 +5,7 @@
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
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index 7a7c5e4ed0e..c1a4b82a0d0 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/sig2str.c b/lib/sig2str.c
index f2f01d1f6fc..8e2fc0c0754 100644
--- a/lib/sig2str.c
+++ b/lib/sig2str.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/sig2str.h b/lib/sig2str.h
index a507170b64a..a45af7f9686 100644
--- a/lib/sig2str.h
+++ b/lib/sig2str.h
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/strftime.h b/lib/strftime.h
index 9e5cdc3f32c..a9847084f01 100644
--- a/lib/strftime.h
+++ b/lib/strftime.h
@@ -4,7 +4,7 @@
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 3 of the 7 published by the Free Software Foundation, either version 3 of the
8 License, or (at your option) any later version. 8 License, or (at your option) any later version.
9 9
10 This file is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
diff --git a/lib/string.in.h b/lib/string.in.h
index 03e6a17a36d..c9432948c15 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -563,22 +563,35 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - "
563# undef strndup 563# undef strndup
564# define strndup rpl_strndup 564# define strndup rpl_strndup
565# endif 565# endif
566_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) 566_GL_FUNCDECL_RPL (strndup, char *,
567 _GL_ARG_NONNULL ((1))); 567 (char const *__s, size_t __n)
568 _GL_ARG_NONNULL ((1))
569 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
568_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); 570_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
569# else 571# else
570# if ! @HAVE_DECL_STRNDUP@ 572# if !@HAVE_DECL_STRNDUP@ || __GNUC__ >= 11
571_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) 573_GL_FUNCDECL_SYS (strndup, char *,
572 _GL_ARG_NONNULL ((1))); 574 (char const *__s, size_t __n)
575 _GL_ARG_NONNULL ((1))
576 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
573# endif 577# endif
574_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); 578_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
575# endif 579# endif
576_GL_CXXALIASWARN (strndup); 580_GL_CXXALIASWARN (strndup);
577#elif defined GNULIB_POSIXCHECK 581#else
578# undef strndup 582# if __GNUC__ >= 11
579# if HAVE_RAW_DECL_STRNDUP 583/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */
584_GL_FUNCDECL_SYS (strndup, char *,
585 (char const *__s, size_t __n)
586 _GL_ARG_NONNULL ((1))
587 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
588# endif
589# if defined GNULIB_POSIXCHECK
590# undef strndup
591# if HAVE_RAW_DECL_STRNDUP
580_GL_WARN_ON_USE (strndup, "strndup is unportable - " 592_GL_WARN_ON_USE (strndup, "strndup is unportable - "
581 "use gnulib module strndup for portability"); 593 "use gnulib module strndup for portability");
594# endif
582# endif 595# endif
583#endif 596#endif
584 597
diff --git a/lib/strtoimax.c b/lib/strtoimax.c
index d562746ee78..cad12d0d9be 100644
--- a/lib/strtoimax.c
+++ b/lib/strtoimax.c
@@ -5,7 +5,7 @@
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 7 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 3 of the 8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version. 9 License, or (at your option) any later version.
10 10
11 This file is distributed in the hope that it will be useful, 11 This file is distributed in the hope that it will be useful,
diff --git a/lib/strtol.c b/lib/strtol.c
index 457f7a5d649..6c2e9333abc 100644
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -8,7 +8,7 @@
8 8
9 This file is free software: you can redistribute it and/or modify 9 This file is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as 10 it under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation; either version 3 of the 11 published by the Free Software Foundation, either version 3 of the
12 License, or (at your option) any later version. 12 License, or (at your option) any later version.
13 13
14 This file is distributed in the hope that it will be useful, 14 This file is distributed in the hope that it will be useful,
diff --git a/lib/strtoll.c b/lib/strtoll.c
index 5124168c1bb..acea42ee003 100644
--- a/lib/strtoll.c
+++ b/lib/strtoll.c
@@ -5,7 +5,7 @@
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 7 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 3 of the 8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version. 9 License, or (at your option) any later version.
10 10
11 This file is distributed in the hope that it will be useful, 11 This file is distributed in the hope that it will be useful,
diff --git a/lib/symlink.c b/lib/symlink.c
index 51850b2732c..26310af7b12 100644
--- a/lib/symlink.c
+++ b/lib/symlink.c
@@ -3,7 +3,7 @@
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 3 of the 6 published by the Free Software Foundation, either version 3 of the
7 License, or (at your option) any later version. 7 License, or (at your option) any later version.
8 8
9 This file is distributed in the hope that it will be useful, 9 This file is distributed in the hope that it will be useful,
diff --git a/lib/time-internal.h b/lib/time-internal.h
index e1bb56e53ec..c8a2a8ce6bc 100644
--- a/lib/time-internal.h
+++ b/lib/time-internal.h
@@ -4,7 +4,7 @@
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 3 of the 7 published by the Free Software Foundation, either version 3 of the
8 License, or (at your option) any later version. 8 License, or (at your option) any later version.
9 9
10 This file is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
diff --git a/lib/time_rz.c b/lib/time_rz.c
index d0ae717f308..1a91d3778e7 100644
--- a/lib/time_rz.c
+++ b/lib/time_rz.c
@@ -4,7 +4,7 @@
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 3 of the 7 published by the Free Software Foundation, either version 3 of the
8 License, or (at your option) any later version. 8 License, or (at your option) any later version.
9 9
10 This file is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
diff --git a/lib/timespec-add.c b/lib/timespec-add.c
index cd0b5f5f5be..0f270e5bc8c 100644
--- a/lib/timespec-add.c
+++ b/lib/timespec-add.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/timespec-sub.c b/lib/timespec-sub.c
index 2b2aaa59373..36747833e39 100644
--- a/lib/timespec-sub.c
+++ b/lib/timespec-sub.c
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/timespec.c b/lib/timespec.c
index 82630c2f5a0..9d136cb803b 100644
--- a/lib/timespec.c
+++ b/lib/timespec.c
@@ -4,7 +4,7 @@
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 3 of the 7 published by the Free Software Foundation, either version 3 of the
8 License, or (at your option) any later version. 8 License, or (at your option) any later version.
9 9
10 This file is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
diff --git a/lib/timespec.h b/lib/timespec.h
index e130d2c6e25..9e358289a2a 100644
--- a/lib/timespec.h
+++ b/lib/timespec.h
@@ -5,7 +5,7 @@
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 7 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 3 of the 8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version. 9 License, or (at your option) any later version.
10 10
11 This file is distributed in the hope that it will be useful, 11 This file is distributed in the hope that it will be useful,
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 3386f0b0f75..57df09ecdf4 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -415,16 +415,30 @@ _GL_CXXALIASWARN (close);
415 415
416 416
417#if @GNULIB_COPY_FILE_RANGE@ 417#if @GNULIB_COPY_FILE_RANGE@
418# if !@HAVE_COPY_FILE_RANGE@ 418# if @REPLACE_COPY_FILE_RANGE@
419# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
420# undef copy_file_range
421# define copy_file_range rpl_copy_file_range
422# endif
423_GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos,
424 int ofd, off_t *opos,
425 size_t len, unsigned flags));
426_GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos,
427 int ofd, off_t *opos,
428 size_t len, unsigned flags));
429# else
430# if !@HAVE_COPY_FILE_RANGE@
419_GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, 431_GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
420 int ofd, off_t *opos, 432 int ofd, off_t *opos,
421 size_t len, unsigned flags)); 433 size_t len, unsigned flags));
434# endif
422_GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, 435_GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
423 int ofd, off_t *opos, 436 int ofd, off_t *opos,
424 size_t len, unsigned flags)); 437 size_t len, unsigned flags));
425# endif 438# endif
426_GL_CXXALIASWARN (copy_file_range); 439_GL_CXXALIASWARN (copy_file_range);
427#elif defined GNULIB_POSIXCHECK 440#elif defined GNULIB_POSIXCHECK
441# undef copy_file_range
428# if HAVE_RAW_DECL_COPY_FILE_RANGE 442# if HAVE_RAW_DECL_COPY_FILE_RANGE
429_GL_WARN_ON_USE (copy_file_range, 443_GL_WARN_ON_USE (copy_file_range,
430 "copy_file_range is unportable - " 444 "copy_file_range is unportable - "
diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h
index ce52f8f9773..7461d740959 100644
--- a/lib/unlocked-io.h
+++ b/lib/unlocked-io.h
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/lib/utimens.c b/lib/utimens.c
index f4907ae4e61..2fa12518507 100644
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -4,7 +4,7 @@
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 3 of the 7 published by the Free Software Foundation, either version 3 of the
8 License, or (at your option) any later version. 8 License, or (at your option) any later version.
9 9
10 This file is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
diff --git a/lib/utimens.h b/lib/utimens.h
index c3054da0c67..2ccc06e5ed6 100644
--- a/lib/utimens.h
+++ b/lib/utimens.h
@@ -4,7 +4,7 @@
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 3 of the 7 published by the Free Software Foundation, either version 3 of the
8 License, or (at your option) any later version. 8 License, or (at your option) any later version.
9 9
10 This file is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
diff --git a/lib/utimensat.c b/lib/utimensat.c
index 2e4c7bf9660..f81b0c790ef 100644
--- a/lib/utimensat.c
+++ b/lib/utimensat.c
@@ -3,7 +3,7 @@
3 3
4 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
5 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
6 the Free Software Foundation; either version 3 of the License, or 6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version. 7 (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
diff --git a/lib/vla.h b/lib/vla.h
index adc8f8f68b6..ce02428f53a 100644
--- a/lib/vla.h
+++ b/lib/vla.h
@@ -4,7 +4,7 @@
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
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,