diff options
| author | Paul Eggert | 2022-02-23 11:11:52 -0800 |
|---|---|---|
| committer | Paul Eggert | 2022-02-23 11:41:02 -0800 |
| commit | 308e63ccfcc6a6b1285bb17eff641f48639fb329 (patch) | |
| tree | e3f1daf0bdfb7180fc1f007280fa2a4ee43c259c /lib | |
| parent | 995aed477dc9be708920cc46442673126ed75760 (diff) | |
| download | emacs-308e63ccfcc6a6b1285bb17eff641f48639fb329.tar.gz emacs-308e63ccfcc6a6b1285bb17eff641f48639fb329.zip | |
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib')
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, |
| @@ -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 | |||
| 23 | ssize_t | 27 | ssize_t |
| 24 | copy_file_range (int infd, off_t *pinoff, | 28 | copy_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: |
| 33 | static const char * | 31 | (\.[A-Za-z~][A-Za-z0-9~]*)*$ |
| 34 | match_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. */ | ||
| 35 | static idx_t | ||
| 36 | file_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 | |||
| 60 | static int | 59 | static int |
| 61 | order (unsigned char c) | 60 | order (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 */ |
| 83 | static int _GL_ATTRIBUTE_PURE | 89 | static int _GL_ATTRIBUTE_PURE |
| 84 | verrevcmp (const char *s1, size_t s1_len, const char *s2, size_t s2_len) | 90 | verrevcmp (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) | |||
| 124 | int | 131 | int |
| 125 | filevercmp (const char *s1, const char *s2) | 132 | filevercmp (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; | 139 | int |
| 141 | if (!*s2) | 140 | filenvercmp (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~]*)*) | 67 | int 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) |
| 40 | int 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. */ | ||
| 73 | int 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@ | |||
| 191 | BYTESWAP_H = @BYTESWAP_H@ | 191 | BYTESWAP_H = @BYTESWAP_H@ |
| 192 | CAIRO_CFLAGS = @CAIRO_CFLAGS@ | 192 | CAIRO_CFLAGS = @CAIRO_CFLAGS@ |
| 193 | CAIRO_LIBS = @CAIRO_LIBS@ | 193 | CAIRO_LIBS = @CAIRO_LIBS@ |
| 194 | CAIRO_XCB_CFLAGS = @CAIRO_XCB_CFLAGS@ | ||
| 195 | CAIRO_XCB_LIBS = @CAIRO_XCB_LIBS@ | ||
| 196 | CAIRO_XLIB_CFLAGS = @CAIRO_XLIB_CFLAGS@ | ||
| 197 | CAIRO_XLIB_LIBS = @CAIRO_XLIB_LIBS@ | ||
| 194 | CC = @CC@ | 198 | CC = @CC@ |
| 195 | CFLAGS = @CFLAGS@ | 199 | CFLAGS = @CFLAGS@ |
| 196 | CFLAGS_SOUND = @CFLAGS_SOUND@ | 200 | CFLAGS_SOUND = @CFLAGS_SOUND@ |
| @@ -247,7 +251,59 @@ GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ | |||
| 247 | GETOPT_H = @GETOPT_H@ | 251 | GETOPT_H = @GETOPT_H@ |
| 248 | GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@ | 252 | GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@ |
| 249 | GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@ | 253 | GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@ |
| 254 | GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@ | ||
| 255 | GL_CFLAG_GNULIB_WARNINGS = @GL_CFLAG_GNULIB_WARNINGS@ | ||
| 250 | GL_COND_LIBTOOL_CONDITION = @GL_COND_LIBTOOL_CONDITION@ | 256 | GL_COND_LIBTOOL_CONDITION = @GL_COND_LIBTOOL_CONDITION@ |
| 257 | GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION = @GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION@ | ||
| 258 | GL_COND_OBJ_COPY_FILE_RANGE_CONDITION = @GL_COND_OBJ_COPY_FILE_RANGE_CONDITION@ | ||
| 259 | GL_COND_OBJ_DIRFD_CONDITION = @GL_COND_OBJ_DIRFD_CONDITION@ | ||
| 260 | GL_COND_OBJ_DUP2_CONDITION = @GL_COND_OBJ_DUP2_CONDITION@ | ||
| 261 | GL_COND_OBJ_EUIDACCESS_CONDITION = @GL_COND_OBJ_EUIDACCESS_CONDITION@ | ||
| 262 | GL_COND_OBJ_EXECINFO_CONDITION = @GL_COND_OBJ_EXECINFO_CONDITION@ | ||
| 263 | GL_COND_OBJ_EXPLICIT_BZERO_CONDITION = @GL_COND_OBJ_EXPLICIT_BZERO_CONDITION@ | ||
| 264 | GL_COND_OBJ_FACCESSAT_CONDITION = @GL_COND_OBJ_FACCESSAT_CONDITION@ | ||
| 265 | GL_COND_OBJ_FCHMODAT_CONDITION = @GL_COND_OBJ_FCHMODAT_CONDITION@ | ||
| 266 | GL_COND_OBJ_FCNTL_CONDITION = @GL_COND_OBJ_FCNTL_CONDITION@ | ||
| 267 | GL_COND_OBJ_FDOPENDIR_CONDITION = @GL_COND_OBJ_FDOPENDIR_CONDITION@ | ||
| 268 | GL_COND_OBJ_FPENDING_CONDITION = @GL_COND_OBJ_FPENDING_CONDITION@ | ||
| 269 | GL_COND_OBJ_FREE_CONDITION = @GL_COND_OBJ_FREE_CONDITION@ | ||
| 270 | GL_COND_OBJ_FSTATAT_CONDITION = @GL_COND_OBJ_FSTATAT_CONDITION@ | ||
| 271 | GL_COND_OBJ_FSUSAGE_CONDITION = @GL_COND_OBJ_FSUSAGE_CONDITION@ | ||
| 272 | GL_COND_OBJ_FSYNC_CONDITION = @GL_COND_OBJ_FSYNC_CONDITION@ | ||
| 273 | GL_COND_OBJ_FUTIMENS_CONDITION = @GL_COND_OBJ_FUTIMENS_CONDITION@ | ||
| 274 | GL_COND_OBJ_GETDTABLESIZE_CONDITION = @GL_COND_OBJ_GETDTABLESIZE_CONDITION@ | ||
| 275 | GL_COND_OBJ_GETGROUPS_CONDITION = @GL_COND_OBJ_GETGROUPS_CONDITION@ | ||
| 276 | GL_COND_OBJ_GETLOADAVG_CONDITION = @GL_COND_OBJ_GETLOADAVG_CONDITION@ | ||
| 277 | GL_COND_OBJ_GETOPT_CONDITION = @GL_COND_OBJ_GETOPT_CONDITION@ | ||
| 278 | GL_COND_OBJ_GETRANDOM_CONDITION = @GL_COND_OBJ_GETRANDOM_CONDITION@ | ||
| 279 | GL_COND_OBJ_GETTIMEOFDAY_CONDITION = @GL_COND_OBJ_GETTIMEOFDAY_CONDITION@ | ||
| 280 | GL_COND_OBJ_GROUP_MEMBER_CONDITION = @GL_COND_OBJ_GROUP_MEMBER_CONDITION@ | ||
| 281 | GL_COND_OBJ_LCHMOD_CONDITION = @GL_COND_OBJ_LCHMOD_CONDITION@ | ||
| 282 | GL_COND_OBJ_LSTAT_CONDITION = @GL_COND_OBJ_LSTAT_CONDITION@ | ||
| 283 | GL_COND_OBJ_MEMPCPY_CONDITION = @GL_COND_OBJ_MEMPCPY_CONDITION@ | ||
| 284 | GL_COND_OBJ_MEMRCHR_CONDITION = @GL_COND_OBJ_MEMRCHR_CONDITION@ | ||
| 285 | GL_COND_OBJ_MINI_GMP_GNULIB_CONDITION = @GL_COND_OBJ_MINI_GMP_GNULIB_CONDITION@ | ||
| 286 | GL_COND_OBJ_MKOSTEMP_CONDITION = @GL_COND_OBJ_MKOSTEMP_CONDITION@ | ||
| 287 | GL_COND_OBJ_OPEN_CONDITION = @GL_COND_OBJ_OPEN_CONDITION@ | ||
| 288 | GL_COND_OBJ_PSELECT_CONDITION = @GL_COND_OBJ_PSELECT_CONDITION@ | ||
| 289 | GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION = @GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION@ | ||
| 290 | GL_COND_OBJ_RAWMEMCHR_CONDITION = @GL_COND_OBJ_RAWMEMCHR_CONDITION@ | ||
| 291 | GL_COND_OBJ_READLINKAT_CONDITION = @GL_COND_OBJ_READLINKAT_CONDITION@ | ||
| 292 | GL_COND_OBJ_READLINK_CONDITION = @GL_COND_OBJ_READLINK_CONDITION@ | ||
| 293 | GL_COND_OBJ_REGEX_CONDITION = @GL_COND_OBJ_REGEX_CONDITION@ | ||
| 294 | GL_COND_OBJ_SIG2STR_CONDITION = @GL_COND_OBJ_SIG2STR_CONDITION@ | ||
| 295 | GL_COND_OBJ_SIGDESCR_NP_CONDITION = @GL_COND_OBJ_SIGDESCR_NP_CONDITION@ | ||
| 296 | GL_COND_OBJ_STDIO_READ_CONDITION = @GL_COND_OBJ_STDIO_READ_CONDITION@ | ||
| 297 | GL_COND_OBJ_STDIO_WRITE_CONDITION = @GL_COND_OBJ_STDIO_WRITE_CONDITION@ | ||
| 298 | GL_COND_OBJ_STPCPY_CONDITION = @GL_COND_OBJ_STPCPY_CONDITION@ | ||
| 299 | GL_COND_OBJ_STRNLEN_CONDITION = @GL_COND_OBJ_STRNLEN_CONDITION@ | ||
| 300 | GL_COND_OBJ_STRTOIMAX_CONDITION = @GL_COND_OBJ_STRTOIMAX_CONDITION@ | ||
| 301 | GL_COND_OBJ_STRTOLL_CONDITION = @GL_COND_OBJ_STRTOLL_CONDITION@ | ||
| 302 | GL_COND_OBJ_SYMLINK_CONDITION = @GL_COND_OBJ_SYMLINK_CONDITION@ | ||
| 303 | GL_COND_OBJ_TIMEGM_CONDITION = @GL_COND_OBJ_TIMEGM_CONDITION@ | ||
| 304 | GL_COND_OBJ_TIME_RZ_CONDITION = @GL_COND_OBJ_TIME_RZ_CONDITION@ | ||
| 305 | GL_COND_OBJ_TIME_R_CONDITION = @GL_COND_OBJ_TIME_R_CONDITION@ | ||
| 306 | GL_COND_OBJ_UTIMENSAT_CONDITION = @GL_COND_OBJ_UTIMENSAT_CONDITION@ | ||
| 251 | GL_GENERATE_ALLOCA_H_CONDITION = @GL_GENERATE_ALLOCA_H_CONDITION@ | 307 | GL_GENERATE_ALLOCA_H_CONDITION = @GL_GENERATE_ALLOCA_H_CONDITION@ |
| 252 | GL_GENERATE_BYTESWAP_H_CONDITION = @GL_GENERATE_BYTESWAP_H_CONDITION@ | 308 | GL_GENERATE_BYTESWAP_H_CONDITION = @GL_GENERATE_BYTESWAP_H_CONDITION@ |
| 253 | GL_GENERATE_ERRNO_H_CONDITION = @GL_GENERATE_ERRNO_H_CONDITION@ | 309 | GL_GENERATE_ERRNO_H_CONDITION = @GL_GENERATE_ERRNO_H_CONDITION@ |
| @@ -974,6 +1030,7 @@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ | |||
| 974 | REPLACE_CHOWN = @REPLACE_CHOWN@ | 1030 | REPLACE_CHOWN = @REPLACE_CHOWN@ |
| 975 | REPLACE_CLOSE = @REPLACE_CLOSE@ | 1031 | REPLACE_CLOSE = @REPLACE_CLOSE@ |
| 976 | REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ | 1032 | REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ |
| 1033 | REPLACE_COPY_FILE_RANGE = @REPLACE_COPY_FILE_RANGE@ | ||
| 977 | REPLACE_CREAT = @REPLACE_CREAT@ | 1034 | REPLACE_CREAT = @REPLACE_CREAT@ |
| 978 | REPLACE_CTIME = @REPLACE_CTIME@ | 1035 | REPLACE_CTIME = @REPLACE_CTIME@ |
| 979 | REPLACE_DIRFD = @REPLACE_DIRFD@ | 1036 | REPLACE_DIRFD = @REPLACE_DIRFD@ |
| @@ -1197,6 +1254,8 @@ XOBJ = @XOBJ@ | |||
| 1197 | XRANDR_CFLAGS = @XRANDR_CFLAGS@ | 1254 | XRANDR_CFLAGS = @XRANDR_CFLAGS@ |
| 1198 | XRANDR_LIBS = @XRANDR_LIBS@ | 1255 | XRANDR_LIBS = @XRANDR_LIBS@ |
| 1199 | XRENDER_LIBS = @XRENDER_LIBS@ | 1256 | XRENDER_LIBS = @XRENDER_LIBS@ |
| 1257 | XSYNC_CFLAGS = @XSYNC_CFLAGS@ | ||
| 1258 | XSYNC_LIBS = @XSYNC_LIBS@ | ||
| 1200 | XWIDGETS_OBJ = @XWIDGETS_OBJ@ | 1259 | XWIDGETS_OBJ = @XWIDGETS_OBJ@ |
| 1201 | X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@ | 1260 | X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@ |
| 1202 | ac_ct_CC = @ac_ct_CC@ | 1261 | ac_ct_CC = @ac_ct_CC@ |
| @@ -1251,8 +1310,10 @@ gl_GNULIB_ENABLED_rawmemchr_CONDITION = @gl_GNULIB_ENABLED_rawmemchr_CONDITION@ | |||
| 1251 | gl_GNULIB_ENABLED_scratch_buffer_CONDITION = @gl_GNULIB_ENABLED_scratch_buffer_CONDITION@ | 1310 | gl_GNULIB_ENABLED_scratch_buffer_CONDITION = @gl_GNULIB_ENABLED_scratch_buffer_CONDITION@ |
| 1252 | gl_GNULIB_ENABLED_strtoll_CONDITION = @gl_GNULIB_ENABLED_strtoll_CONDITION@ | 1311 | gl_GNULIB_ENABLED_strtoll_CONDITION = @gl_GNULIB_ENABLED_strtoll_CONDITION@ |
| 1253 | gl_GNULIB_ENABLED_utimens_CONDITION = @gl_GNULIB_ENABLED_utimens_CONDITION@ | 1312 | gl_GNULIB_ENABLED_utimens_CONDITION = @gl_GNULIB_ENABLED_utimens_CONDITION@ |
| 1313 | gl_LIBOBJDEPS = @gl_LIBOBJDEPS@ | ||
| 1254 | gl_LIBOBJS = @gl_LIBOBJS@ | 1314 | gl_LIBOBJS = @gl_LIBOBJS@ |
| 1255 | gl_LTLIBOBJS = @gl_LTLIBOBJS@ | 1315 | gl_LTLIBOBJS = @gl_LTLIBOBJS@ |
| 1316 | gltests_LIBOBJDEPS = @gltests_LIBOBJDEPS@ | ||
| 1256 | gltests_LIBOBJS = @gltests_LIBOBJS@ | 1317 | gltests_LIBOBJS = @gltests_LIBOBJS@ |
| 1257 | gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ | 1318 | gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ |
| 1258 | gltests_WITNESS = @gltests_WITNESS@ | 1319 | gltests_WITNESS = @gltests_WITNESS@ |
| @@ -1303,6 +1364,7 @@ x_default_search_path = @x_default_search_path@ | |||
| 1303 | noinst_LIBRARIES += libgnu.a | 1364 | noinst_LIBRARIES += libgnu.a |
| 1304 | 1365 | ||
| 1305 | libgnu_a_SOURCES = | 1366 | libgnu_a_SOURCES = |
| 1367 | libgnu_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS) | ||
| 1306 | libgnu_a_LIBADD = $(gl_LIBOBJS) | 1368 | libgnu_a_LIBADD = $(gl_LIBOBJS) |
| 1307 | libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) | 1369 | libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) |
| 1308 | EXTRA_libgnu_a_SOURCES = | 1370 | EXTRA_libgnu_a_SOURCES = |
| @@ -1432,10 +1494,9 @@ endif | |||
| 1432 | ## begin gnulib module canonicalize-lgpl | 1494 | ## begin gnulib module canonicalize-lgpl |
| 1433 | ifeq (,$(OMIT_GNULIB_MODULE_canonicalize-lgpl)) | 1495 | ifeq (,$(OMIT_GNULIB_MODULE_canonicalize-lgpl)) |
| 1434 | 1496 | ||
| 1435 | 1497 | ifneq (,$(GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION)) | |
| 1436 | EXTRA_DIST += canonicalize-lgpl.c | 1498 | libgnu_a_SOURCES += canonicalize-lgpl.c |
| 1437 | 1499 | endif | |
| 1438 | EXTRA_libgnu_a_SOURCES += canonicalize-lgpl.c | ||
| 1439 | 1500 | ||
| 1440 | endif | 1501 | endif |
| 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 |
| 1476 | ifeq (,$(OMIT_GNULIB_MODULE_copy-file-range)) | 1537 | ifeq (,$(OMIT_GNULIB_MODULE_copy-file-range)) |
| 1477 | 1538 | ||
| 1478 | 1539 | ifneq (,$(GL_COND_OBJ_COPY_FILE_RANGE_CONDITION)) | |
| 1479 | EXTRA_DIST += copy-file-range.c | 1540 | libgnu_a_SOURCES += copy-file-range.c |
| 1480 | 1541 | endif | |
| 1481 | EXTRA_libgnu_a_SOURCES += copy-file-range.c | ||
| 1482 | 1542 | ||
| 1483 | endif | 1543 | endif |
| 1484 | ## end gnulib module copy-file-range | 1544 | ## end gnulib module copy-file-range |
| @@ -1621,13 +1681,12 @@ endif | |||
| 1621 | ifeq (,$(OMIT_GNULIB_MODULE_dirfd)) | 1681 | ifeq (,$(OMIT_GNULIB_MODULE_dirfd)) |
| 1622 | 1682 | ||
| 1623 | ifneq (,$(gl_GNULIB_ENABLED_dirfd_CONDITION)) | 1683 | ifneq (,$(gl_GNULIB_ENABLED_dirfd_CONDITION)) |
| 1624 | 1684 | ifneq (,$(GL_COND_OBJ_DIRFD_CONDITION)) | |
| 1685 | libgnu_a_SOURCES += dirfd.c | ||
| 1625 | endif | 1686 | endif |
| 1626 | EXTRA_DIST += dirfd.c | ||
| 1627 | |||
| 1628 | EXTRA_libgnu_a_SOURCES += dirfd.c | ||
| 1629 | 1687 | ||
| 1630 | endif | 1688 | endif |
| 1689 | endif | ||
| 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 |
| 1654 | ifeq (,$(OMIT_GNULIB_MODULE_dup2)) | 1713 | ifeq (,$(OMIT_GNULIB_MODULE_dup2)) |
| 1655 | 1714 | ||
| 1656 | 1715 | ifneq (,$(GL_COND_OBJ_DUP2_CONDITION)) | |
| 1657 | EXTRA_DIST += dup2.c | 1716 | libgnu_a_SOURCES += dup2.c |
| 1658 | 1717 | endif | |
| 1659 | EXTRA_libgnu_a_SOURCES += dup2.c | ||
| 1660 | 1718 | ||
| 1661 | endif | 1719 | endif |
| 1662 | ## end gnulib module dup2 | 1720 | ## end gnulib module dup2 |
| @@ -1747,13 +1805,12 @@ endif | |||
| 1747 | ifeq (,$(OMIT_GNULIB_MODULE_euidaccess)) | 1805 | ifeq (,$(OMIT_GNULIB_MODULE_euidaccess)) |
| 1748 | 1806 | ||
| 1749 | ifneq (,$(gl_GNULIB_ENABLED_euidaccess_CONDITION)) | 1807 | ifneq (,$(gl_GNULIB_ENABLED_euidaccess_CONDITION)) |
| 1750 | 1808 | ifneq (,$(GL_COND_OBJ_EUIDACCESS_CONDITION)) | |
| 1809 | libgnu_a_SOURCES += euidaccess.c | ||
| 1751 | endif | 1810 | endif |
| 1752 | EXTRA_DIST += euidaccess.c | ||
| 1753 | |||
| 1754 | EXTRA_libgnu_a_SOURCES += euidaccess.c | ||
| 1755 | 1811 | ||
| 1756 | endif | 1812 | endif |
| 1813 | endif | ||
| 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 | |||
| 1773 | endif | 1830 | endif |
| 1774 | MOSTLYCLEANFILES += execinfo.h execinfo.h-t | 1831 | MOSTLYCLEANFILES += execinfo.h execinfo.h-t |
| 1775 | 1832 | ||
| 1776 | EXTRA_DIST += execinfo.c execinfo.in.h | 1833 | ifneq (,$(GL_COND_OBJ_EXECINFO_CONDITION)) |
| 1834 | libgnu_a_SOURCES += execinfo.c | ||
| 1835 | endif | ||
| 1777 | 1836 | ||
| 1778 | EXTRA_libgnu_a_SOURCES += execinfo.c | 1837 | EXTRA_DIST += execinfo.in.h |
| 1779 | 1838 | ||
| 1780 | endif | 1839 | endif |
| 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 |
| 1784 | ifeq (,$(OMIT_GNULIB_MODULE_explicit_bzero)) | 1843 | ifeq (,$(OMIT_GNULIB_MODULE_explicit_bzero)) |
| 1785 | 1844 | ||
| 1786 | 1845 | ifneq (,$(GL_COND_OBJ_EXPLICIT_BZERO_CONDITION)) | |
| 1787 | EXTRA_DIST += explicit_bzero.c | 1846 | libgnu_a_SOURCES += explicit_bzero.c |
| 1788 | 1847 | endif | |
| 1789 | EXTRA_libgnu_a_SOURCES += explicit_bzero.c | ||
| 1790 | 1848 | ||
| 1791 | endif | 1849 | endif |
| 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 |
| 1795 | ifeq (,$(OMIT_GNULIB_MODULE_faccessat)) | 1853 | ifeq (,$(OMIT_GNULIB_MODULE_faccessat)) |
| 1796 | 1854 | ||
| 1855 | ifneq (,$(GL_COND_OBJ_FACCESSAT_CONDITION)) | ||
| 1856 | libgnu_a_SOURCES += faccessat.c | ||
| 1857 | endif | ||
| 1797 | 1858 | ||
| 1798 | EXTRA_DIST += at-func.c faccessat.c | 1859 | EXTRA_DIST += at-func.c |
| 1799 | 1860 | ||
| 1800 | EXTRA_libgnu_a_SOURCES += at-func.c faccessat.c | 1861 | EXTRA_libgnu_a_SOURCES += at-func.c |
| 1801 | 1862 | ||
| 1802 | endif | 1863 | endif |
| 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 |
| 1806 | ifeq (,$(OMIT_GNULIB_MODULE_fchmodat)) | 1867 | ifeq (,$(OMIT_GNULIB_MODULE_fchmodat)) |
| 1807 | 1868 | ||
| 1869 | ifneq (,$(GL_COND_OBJ_FCHMODAT_CONDITION)) | ||
| 1870 | libgnu_a_SOURCES += fchmodat.c | ||
| 1871 | endif | ||
| 1808 | 1872 | ||
| 1809 | EXTRA_DIST += at-func.c fchmodat.c | 1873 | EXTRA_DIST += at-func.c |
| 1810 | 1874 | ||
| 1811 | EXTRA_libgnu_a_SOURCES += at-func.c fchmodat.c | 1875 | EXTRA_libgnu_a_SOURCES += at-func.c |
| 1812 | 1876 | ||
| 1813 | endif | 1877 | endif |
| 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 |
| 1817 | ifeq (,$(OMIT_GNULIB_MODULE_fcntl)) | 1881 | ifeq (,$(OMIT_GNULIB_MODULE_fcntl)) |
| 1818 | 1882 | ||
| 1819 | 1883 | ifneq (,$(GL_COND_OBJ_FCNTL_CONDITION)) | |
| 1820 | EXTRA_DIST += fcntl.c | 1884 | libgnu_a_SOURCES += fcntl.c |
| 1821 | 1885 | endif | |
| 1822 | EXTRA_libgnu_a_SOURCES += fcntl.c | ||
| 1823 | 1886 | ||
| 1824 | endif | 1887 | endif |
| 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 |
| 1867 | ifeq (,$(OMIT_GNULIB_MODULE_fdopendir)) | 1930 | ifeq (,$(OMIT_GNULIB_MODULE_fdopendir)) |
| 1868 | 1931 | ||
| 1869 | 1932 | ifneq (,$(GL_COND_OBJ_FDOPENDIR_CONDITION)) | |
| 1870 | EXTRA_DIST += fdopendir.c | 1933 | libgnu_a_SOURCES += fdopendir.c |
| 1871 | 1934 | endif | |
| 1872 | EXTRA_libgnu_a_SOURCES += fdopendir.c | ||
| 1873 | 1935 | ||
| 1874 | endif | 1936 | endif |
| 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 |
| 1926 | ifeq (,$(OMIT_GNULIB_MODULE_fpending)) | 1988 | ifeq (,$(OMIT_GNULIB_MODULE_fpending)) |
| 1927 | 1989 | ||
| 1990 | ifneq (,$(GL_COND_OBJ_FPENDING_CONDITION)) | ||
| 1991 | libgnu_a_SOURCES += fpending.c | ||
| 1992 | endif | ||
| 1928 | 1993 | ||
| 1929 | EXTRA_DIST += fpending.c fpending.h stdio-impl.h | 1994 | EXTRA_DIST += fpending.h stdio-impl.h |
| 1930 | |||
| 1931 | EXTRA_libgnu_a_SOURCES += fpending.c | ||
| 1932 | 1995 | ||
| 1933 | endif | 1996 | endif |
| 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 |
| 1937 | ifeq (,$(OMIT_GNULIB_MODULE_free-posix)) | 2000 | ifeq (,$(OMIT_GNULIB_MODULE_free-posix)) |
| 1938 | 2001 | ||
| 1939 | 2002 | ifneq (,$(GL_COND_OBJ_FREE_CONDITION)) | |
| 1940 | EXTRA_DIST += free.c | 2003 | libgnu_a_SOURCES += free.c |
| 1941 | 2004 | endif | |
| 1942 | EXTRA_libgnu_a_SOURCES += free.c | ||
| 1943 | 2005 | ||
| 1944 | endif | 2006 | endif |
| 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 |
| 1948 | ifeq (,$(OMIT_GNULIB_MODULE_fstatat)) | 2010 | ifeq (,$(OMIT_GNULIB_MODULE_fstatat)) |
| 1949 | 2011 | ||
| 2012 | ifneq (,$(GL_COND_OBJ_FSTATAT_CONDITION)) | ||
| 2013 | libgnu_a_SOURCES += fstatat.c | ||
| 2014 | endif | ||
| 1950 | 2015 | ||
| 1951 | EXTRA_DIST += at-func.c fstatat.c | 2016 | EXTRA_DIST += at-func.c |
| 1952 | 2017 | ||
| 1953 | EXTRA_libgnu_a_SOURCES += at-func.c fstatat.c | 2018 | EXTRA_libgnu_a_SOURCES += at-func.c |
| 1954 | 2019 | ||
| 1955 | endif | 2020 | endif |
| 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 |
| 1959 | ifeq (,$(OMIT_GNULIB_MODULE_fsusage)) | 2024 | ifeq (,$(OMIT_GNULIB_MODULE_fsusage)) |
| 1960 | 2025 | ||
| 2026 | ifneq (,$(GL_COND_OBJ_FSUSAGE_CONDITION)) | ||
| 2027 | libgnu_a_SOURCES += fsusage.c | ||
| 2028 | endif | ||
| 1961 | 2029 | ||
| 1962 | EXTRA_DIST += fsusage.c fsusage.h | 2030 | EXTRA_DIST += fsusage.h |
| 1963 | |||
| 1964 | EXTRA_libgnu_a_SOURCES += fsusage.c | ||
| 1965 | 2031 | ||
| 1966 | endif | 2032 | endif |
| 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 |
| 1970 | ifeq (,$(OMIT_GNULIB_MODULE_fsync)) | 2036 | ifeq (,$(OMIT_GNULIB_MODULE_fsync)) |
| 1971 | 2037 | ||
| 1972 | 2038 | ifneq (,$(GL_COND_OBJ_FSYNC_CONDITION)) | |
| 1973 | EXTRA_DIST += fsync.c | 2039 | libgnu_a_SOURCES += fsync.c |
| 1974 | 2040 | endif | |
| 1975 | EXTRA_libgnu_a_SOURCES += fsync.c | ||
| 1976 | 2041 | ||
| 1977 | endif | 2042 | endif |
| 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 |
| 1981 | ifeq (,$(OMIT_GNULIB_MODULE_futimens)) | 2046 | ifeq (,$(OMIT_GNULIB_MODULE_futimens)) |
| 1982 | 2047 | ||
| 1983 | 2048 | ifneq (,$(GL_COND_OBJ_FUTIMENS_CONDITION)) | |
| 1984 | EXTRA_DIST += futimens.c | 2049 | libgnu_a_SOURCES += futimens.c |
| 1985 | 2050 | endif | |
| 1986 | EXTRA_libgnu_a_SOURCES += futimens.c | ||
| 1987 | 2051 | ||
| 1988 | endif | 2052 | endif |
| 1989 | ## end gnulib module futimens | 2053 | ## end gnulib module futimens |
| @@ -2013,35 +2077,32 @@ endif | |||
| 2013 | ifeq (,$(OMIT_GNULIB_MODULE_getdtablesize)) | 2077 | ifeq (,$(OMIT_GNULIB_MODULE_getdtablesize)) |
| 2014 | 2078 | ||
| 2015 | ifneq (,$(gl_GNULIB_ENABLED_getdtablesize_CONDITION)) | 2079 | ifneq (,$(gl_GNULIB_ENABLED_getdtablesize_CONDITION)) |
| 2016 | 2080 | ifneq (,$(GL_COND_OBJ_GETDTABLESIZE_CONDITION)) | |
| 2081 | libgnu_a_SOURCES += getdtablesize.c | ||
| 2017 | endif | 2082 | endif |
| 2018 | EXTRA_DIST += getdtablesize.c | ||
| 2019 | |||
| 2020 | EXTRA_libgnu_a_SOURCES += getdtablesize.c | ||
| 2021 | 2083 | ||
| 2022 | endif | 2084 | endif |
| 2085 | endif | ||
| 2023 | ## end gnulib module getdtablesize | 2086 | ## end gnulib module getdtablesize |
| 2024 | 2087 | ||
| 2025 | ## begin gnulib module getgroups | 2088 | ## begin gnulib module getgroups |
| 2026 | ifeq (,$(OMIT_GNULIB_MODULE_getgroups)) | 2089 | ifeq (,$(OMIT_GNULIB_MODULE_getgroups)) |
| 2027 | 2090 | ||
| 2028 | ifneq (,$(gl_GNULIB_ENABLED_getgroups_CONDITION)) | 2091 | ifneq (,$(gl_GNULIB_ENABLED_getgroups_CONDITION)) |
| 2029 | 2092 | ifneq (,$(GL_COND_OBJ_GETGROUPS_CONDITION)) | |
| 2093 | libgnu_a_SOURCES += getgroups.c | ||
| 2030 | endif | 2094 | endif |
| 2031 | EXTRA_DIST += getgroups.c | ||
| 2032 | |||
| 2033 | EXTRA_libgnu_a_SOURCES += getgroups.c | ||
| 2034 | 2095 | ||
| 2035 | endif | 2096 | endif |
| 2097 | endif | ||
| 2036 | ## end gnulib module getgroups | 2098 | ## end gnulib module getgroups |
| 2037 | 2099 | ||
| 2038 | ## begin gnulib module getloadavg | 2100 | ## begin gnulib module getloadavg |
| 2039 | ifeq (,$(OMIT_GNULIB_MODULE_getloadavg)) | 2101 | ifeq (,$(OMIT_GNULIB_MODULE_getloadavg)) |
| 2040 | 2102 | ||
| 2041 | 2103 | ifneq (,$(GL_COND_OBJ_GETLOADAVG_CONDITION)) | |
| 2042 | EXTRA_DIST += getloadavg.c | 2104 | libgnu_a_SOURCES += getloadavg.c |
| 2043 | 2105 | endif | |
| 2044 | EXTRA_libgnu_a_SOURCES += getloadavg.c | ||
| 2045 | 2106 | ||
| 2046 | endif | 2107 | endif |
| 2047 | ## end gnulib module getloadavg | 2108 | ## end gnulib module getloadavg |
| @@ -2083,9 +2144,11 @@ endif | |||
| 2083 | 2144 | ||
| 2084 | MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t | 2145 | MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t |
| 2085 | 2146 | ||
| 2086 | EXTRA_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 | 2147 | ifneq (,$(GL_COND_OBJ_GETOPT_CONDITION)) |
| 2148 | libgnu_a_SOURCES += getopt.c getopt1.c | ||
| 2149 | endif | ||
| 2087 | 2150 | ||
| 2088 | EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c | 2151 | EXTRA_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 | ||
| 2090 | endif | 2153 | endif |
| 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 |
| 2094 | ifeq (,$(OMIT_GNULIB_MODULE_getrandom)) | 2157 | ifeq (,$(OMIT_GNULIB_MODULE_getrandom)) |
| 2095 | 2158 | ||
| 2096 | 2159 | ifneq (,$(GL_COND_OBJ_GETRANDOM_CONDITION)) | |
| 2097 | EXTRA_DIST += getrandom.c | 2160 | libgnu_a_SOURCES += getrandom.c |
| 2098 | 2161 | endif | |
| 2099 | EXTRA_libgnu_a_SOURCES += getrandom.c | ||
| 2100 | 2162 | ||
| 2101 | endif | 2163 | endif |
| 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 |
| 2123 | ifeq (,$(OMIT_GNULIB_MODULE_gettimeofday)) | 2185 | ifeq (,$(OMIT_GNULIB_MODULE_gettimeofday)) |
| 2124 | 2186 | ||
| 2125 | 2187 | ifneq (,$(GL_COND_OBJ_GETTIMEOFDAY_CONDITION)) | |
| 2126 | EXTRA_DIST += gettimeofday.c | 2188 | libgnu_a_SOURCES += gettimeofday.c |
| 2127 | 2189 | endif | |
| 2128 | EXTRA_libgnu_a_SOURCES += gettimeofday.c | ||
| 2129 | 2190 | ||
| 2130 | endif | 2191 | endif |
| 2131 | ## end gnulib module gettimeofday | 2192 | ## end gnulib module gettimeofday |
| @@ -2143,13 +2204,12 @@ endif | |||
| 2143 | ifeq (,$(OMIT_GNULIB_MODULE_group-member)) | 2204 | ifeq (,$(OMIT_GNULIB_MODULE_group-member)) |
| 2144 | 2205 | ||
| 2145 | ifneq (,$(gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_CONDITION)) | 2206 | ifneq (,$(gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_CONDITION)) |
| 2146 | 2207 | ifneq (,$(GL_COND_OBJ_GROUP_MEMBER_CONDITION)) | |
| 2208 | libgnu_a_SOURCES += group-member.c | ||
| 2147 | endif | 2209 | endif |
| 2148 | EXTRA_DIST += group-member.c | ||
| 2149 | |||
| 2150 | EXTRA_libgnu_a_SOURCES += group-member.c | ||
| 2151 | 2210 | ||
| 2152 | endif | 2211 | endif |
| 2212 | endif | ||
| 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 | |||
| 2249 | ifeq (,$(OMIT_GNULIB_MODULE_lchmod)) | 2309 | ifeq (,$(OMIT_GNULIB_MODULE_lchmod)) |
| 2250 | 2310 | ||
| 2251 | ifneq (,$(gl_GNULIB_ENABLED_lchmod_CONDITION)) | 2311 | ifneq (,$(gl_GNULIB_ENABLED_lchmod_CONDITION)) |
| 2252 | 2312 | ifneq (,$(GL_COND_OBJ_LCHMOD_CONDITION)) | |
| 2313 | libgnu_a_SOURCES += lchmod.c | ||
| 2253 | endif | 2314 | endif |
| 2254 | EXTRA_DIST += lchmod.c | ||
| 2255 | |||
| 2256 | EXTRA_libgnu_a_SOURCES += lchmod.c | ||
| 2257 | 2315 | ||
| 2258 | endif | 2316 | endif |
| 2317 | endif | ||
| 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 | |||
| 2291 | endif | 2350 | endif |
| 2292 | MOSTLYCLEANFILES += gmp.h gmp.h-t | 2351 | MOSTLYCLEANFILES += gmp.h gmp.h-t |
| 2293 | 2352 | ||
| 2294 | EXTRA_DIST += mini-gmp-gnulib.c mini-gmp.c mini-gmp.h | 2353 | ifneq (,$(GL_COND_OBJ_MINI_GMP_GNULIB_CONDITION)) |
| 2354 | libgnu_a_SOURCES += mini-gmp-gnulib.c | ||
| 2355 | endif | ||
| 2356 | |||
| 2357 | EXTRA_DIST += mini-gmp.c mini-gmp.h | ||
| 2295 | 2358 | ||
| 2296 | EXTRA_libgnu_a_SOURCES += mini-gmp-gnulib.c mini-gmp.c | 2359 | EXTRA_libgnu_a_SOURCES += mini-gmp.c |
| 2297 | 2360 | ||
| 2298 | endif | 2361 | endif |
| 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 |
| 2330 | ifeq (,$(OMIT_GNULIB_MODULE_lstat)) | 2393 | ifeq (,$(OMIT_GNULIB_MODULE_lstat)) |
| 2331 | 2394 | ||
| 2332 | 2395 | ifneq (,$(GL_COND_OBJ_LSTAT_CONDITION)) | |
| 2333 | EXTRA_DIST += lstat.c | 2396 | libgnu_a_SOURCES += lstat.c |
| 2334 | 2397 | endif | |
| 2335 | EXTRA_libgnu_a_SOURCES += lstat.c | ||
| 2336 | 2398 | ||
| 2337 | endif | 2399 | endif |
| 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 |
| 2378 | ifeq (,$(OMIT_GNULIB_MODULE_mempcpy)) | 2440 | ifeq (,$(OMIT_GNULIB_MODULE_mempcpy)) |
| 2379 | 2441 | ||
| 2380 | 2442 | ifneq (,$(GL_COND_OBJ_MEMPCPY_CONDITION)) | |
| 2381 | EXTRA_DIST += mempcpy.c | 2443 | libgnu_a_SOURCES += mempcpy.c |
| 2382 | 2444 | endif | |
| 2383 | EXTRA_libgnu_a_SOURCES += mempcpy.c | ||
| 2384 | 2445 | ||
| 2385 | endif | 2446 | endif |
| 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 |
| 2389 | ifeq (,$(OMIT_GNULIB_MODULE_memrchr)) | 2450 | ifeq (,$(OMIT_GNULIB_MODULE_memrchr)) |
| 2390 | 2451 | ||
| 2391 | 2452 | ifneq (,$(GL_COND_OBJ_MEMRCHR_CONDITION)) | |
| 2392 | EXTRA_DIST += memrchr.c | 2453 | libgnu_a_SOURCES += memrchr.c |
| 2393 | 2454 | endif | |
| 2394 | EXTRA_libgnu_a_SOURCES += memrchr.c | ||
| 2395 | 2455 | ||
| 2396 | endif | 2456 | endif |
| 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 |
| 2408 | ifeq (,$(OMIT_GNULIB_MODULE_mkostemp)) | 2468 | ifeq (,$(OMIT_GNULIB_MODULE_mkostemp)) |
| 2409 | 2469 | ||
| 2410 | 2470 | ifneq (,$(GL_COND_OBJ_MKOSTEMP_CONDITION)) | |
| 2411 | EXTRA_DIST += mkostemp.c | 2471 | libgnu_a_SOURCES += mkostemp.c |
| 2412 | 2472 | endif | |
| 2413 | EXTRA_libgnu_a_SOURCES += mkostemp.c | ||
| 2414 | 2473 | ||
| 2415 | endif | 2474 | endif |
| 2416 | ## end gnulib module mkostemp | 2475 | ## end gnulib module mkostemp |
| @@ -2463,13 +2522,12 @@ endif | |||
| 2463 | ifeq (,$(OMIT_GNULIB_MODULE_open)) | 2522 | ifeq (,$(OMIT_GNULIB_MODULE_open)) |
| 2464 | 2523 | ||
| 2465 | ifneq (,$(gl_GNULIB_ENABLED_open_CONDITION)) | 2524 | ifneq (,$(gl_GNULIB_ENABLED_open_CONDITION)) |
| 2466 | 2525 | ifneq (,$(GL_COND_OBJ_OPEN_CONDITION)) | |
| 2526 | libgnu_a_SOURCES += open.c | ||
| 2467 | endif | 2527 | endif |
| 2468 | EXTRA_DIST += open.c | ||
| 2469 | |||
| 2470 | EXTRA_libgnu_a_SOURCES += open.c | ||
| 2471 | 2528 | ||
| 2472 | endif | 2529 | endif |
| 2530 | endif | ||
| 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 |
| 2504 | ifeq (,$(OMIT_GNULIB_MODULE_pselect)) | 2562 | ifeq (,$(OMIT_GNULIB_MODULE_pselect)) |
| 2505 | 2563 | ||
| 2506 | 2564 | ifneq (,$(GL_COND_OBJ_PSELECT_CONDITION)) | |
| 2507 | EXTRA_DIST += pselect.c | 2565 | libgnu_a_SOURCES += pselect.c |
| 2508 | 2566 | endif | |
| 2509 | EXTRA_libgnu_a_SOURCES += pselect.c | ||
| 2510 | 2567 | ||
| 2511 | endif | 2568 | endif |
| 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 |
| 2515 | ifeq (,$(OMIT_GNULIB_MODULE_pthread_sigmask)) | 2572 | ifeq (,$(OMIT_GNULIB_MODULE_pthread_sigmask)) |
| 2516 | 2573 | ||
| 2517 | 2574 | ifneq (,$(GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION)) | |
| 2518 | EXTRA_DIST += pthread_sigmask.c | 2575 | libgnu_a_SOURCES += pthread_sigmask.c |
| 2519 | 2576 | endif | |
| 2520 | EXTRA_libgnu_a_SOURCES += pthread_sigmask.c | ||
| 2521 | 2577 | ||
| 2522 | endif | 2578 | endif |
| 2523 | ## end gnulib module pthread_sigmask | 2579 | ## end gnulib module pthread_sigmask |
| @@ -2534,11 +2590,12 @@ endif | |||
| 2534 | ifeq (,$(OMIT_GNULIB_MODULE_rawmemchr)) | 2590 | ifeq (,$(OMIT_GNULIB_MODULE_rawmemchr)) |
| 2535 | 2591 | ||
| 2536 | ifneq (,$(gl_GNULIB_ENABLED_rawmemchr_CONDITION)) | 2592 | ifneq (,$(gl_GNULIB_ENABLED_rawmemchr_CONDITION)) |
| 2537 | 2593 | ifneq (,$(GL_COND_OBJ_RAWMEMCHR_CONDITION)) | |
| 2594 | libgnu_a_SOURCES += rawmemchr.c | ||
| 2538 | endif | 2595 | endif |
| 2539 | EXTRA_DIST += rawmemchr.c rawmemchr.valgrind | ||
| 2540 | 2596 | ||
| 2541 | EXTRA_libgnu_a_SOURCES += rawmemchr.c | 2597 | endif |
| 2598 | EXTRA_DIST += rawmemchr.valgrind | ||
| 2542 | 2599 | ||
| 2543 | endif | 2600 | endif |
| 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 |
| 2547 | ifeq (,$(OMIT_GNULIB_MODULE_readlink)) | 2604 | ifeq (,$(OMIT_GNULIB_MODULE_readlink)) |
| 2548 | 2605 | ||
| 2549 | 2606 | ifneq (,$(GL_COND_OBJ_READLINK_CONDITION)) | |
| 2550 | EXTRA_DIST += readlink.c | 2607 | libgnu_a_SOURCES += readlink.c |
| 2551 | 2608 | endif | |
| 2552 | EXTRA_libgnu_a_SOURCES += readlink.c | ||
| 2553 | 2609 | ||
| 2554 | endif | 2610 | endif |
| 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 |
| 2558 | ifeq (,$(OMIT_GNULIB_MODULE_readlinkat)) | 2614 | ifeq (,$(OMIT_GNULIB_MODULE_readlinkat)) |
| 2559 | 2615 | ||
| 2616 | ifneq (,$(GL_COND_OBJ_READLINKAT_CONDITION)) | ||
| 2617 | libgnu_a_SOURCES += readlinkat.c | ||
| 2618 | endif | ||
| 2560 | 2619 | ||
| 2561 | EXTRA_DIST += at-func.c readlinkat.c | 2620 | EXTRA_DIST += at-func.c |
| 2562 | 2621 | ||
| 2563 | EXTRA_libgnu_a_SOURCES += at-func.c readlinkat.c | 2622 | EXTRA_libgnu_a_SOURCES += at-func.c |
| 2564 | 2623 | ||
| 2565 | endif | 2624 | endif |
| 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 |
| 2595 | ifeq (,$(OMIT_GNULIB_MODULE_regex)) | 2654 | ifeq (,$(OMIT_GNULIB_MODULE_regex)) |
| 2596 | 2655 | ||
| 2656 | ifneq (,$(GL_COND_OBJ_REGEX_CONDITION)) | ||
| 2657 | libgnu_a_SOURCES += regex.c | ||
| 2658 | endif | ||
| 2597 | 2659 | ||
| 2598 | EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c | 2660 | EXTRA_DIST += regcomp.c regex.h regex_internal.c regex_internal.h regexec.c |
| 2599 | 2661 | ||
| 2600 | EXTRA_libgnu_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c | 2662 | EXTRA_libgnu_a_SOURCES += regcomp.c regex_internal.c regexec.c |
| 2601 | 2663 | ||
| 2602 | endif | 2664 | endif |
| 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 |
| 2642 | ifeq (,$(OMIT_GNULIB_MODULE_sig2str)) | 2704 | ifeq (,$(OMIT_GNULIB_MODULE_sig2str)) |
| 2643 | 2705 | ||
| 2706 | ifneq (,$(GL_COND_OBJ_SIG2STR_CONDITION)) | ||
| 2707 | libgnu_a_SOURCES += sig2str.c | ||
| 2708 | endif | ||
| 2644 | 2709 | ||
| 2645 | EXTRA_DIST += sig2str.c sig2str.h | 2710 | EXTRA_DIST += sig2str.h |
| 2646 | |||
| 2647 | EXTRA_libgnu_a_SOURCES += sig2str.c | ||
| 2648 | 2711 | ||
| 2649 | endif | 2712 | endif |
| 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 |
| 2653 | ifeq (,$(OMIT_GNULIB_MODULE_sigdescr_np)) | 2716 | ifeq (,$(OMIT_GNULIB_MODULE_sigdescr_np)) |
| 2654 | 2717 | ||
| 2655 | 2718 | ifneq (,$(GL_COND_OBJ_SIGDESCR_NP_CONDITION)) | |
| 2656 | EXTRA_DIST += sigdescr_np.c | 2719 | libgnu_a_SOURCES += sigdescr_np.c |
| 2657 | 2720 | endif | |
| 2658 | EXTRA_libgnu_a_SOURCES += sigdescr_np.c | ||
| 2659 | 2721 | ||
| 2660 | endif | 2722 | endif |
| 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 $@ |
| 3005 | MOSTLYCLEANFILES += stdio.h stdio.h-t | 3067 | MOSTLYCLEANFILES += stdio.h stdio.h-t |
| 3006 | 3068 | ||
| 3069 | ifneq (,$(GL_COND_OBJ_STDIO_READ_CONDITION)) | ||
| 3070 | libgnu_a_SOURCES += stdio-read.c | ||
| 3071 | endif | ||
| 3072 | ifneq (,$(GL_COND_OBJ_STDIO_WRITE_CONDITION)) | ||
| 3073 | libgnu_a_SOURCES += stdio-write.c | ||
| 3074 | endif | ||
| 3075 | |||
| 3007 | EXTRA_DIST += stdio.in.h | 3076 | EXTRA_DIST += stdio.in.h |
| 3008 | 3077 | ||
| 3009 | endif | 3078 | endif |
| @@ -3163,10 +3232,9 @@ endif | |||
| 3163 | ## begin gnulib module stpcpy | 3232 | ## begin gnulib module stpcpy |
| 3164 | ifeq (,$(OMIT_GNULIB_MODULE_stpcpy)) | 3233 | ifeq (,$(OMIT_GNULIB_MODULE_stpcpy)) |
| 3165 | 3234 | ||
| 3166 | 3235 | ifneq (,$(GL_COND_OBJ_STPCPY_CONDITION)) | |
| 3167 | EXTRA_DIST += stpcpy.c | 3236 | libgnu_a_SOURCES += stpcpy.c |
| 3168 | 3237 | endif | |
| 3169 | EXTRA_libgnu_a_SOURCES += stpcpy.c | ||
| 3170 | 3238 | ||
| 3171 | endif | 3239 | endif |
| 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 |
| 3288 | ifeq (,$(OMIT_GNULIB_MODULE_strnlen)) | 3356 | ifeq (,$(OMIT_GNULIB_MODULE_strnlen)) |
| 3289 | 3357 | ||
| 3290 | 3358 | ifneq (,$(GL_COND_OBJ_STRNLEN_CONDITION)) | |
| 3291 | EXTRA_DIST += strnlen.c | 3359 | libgnu_a_SOURCES += strnlen.c |
| 3292 | 3360 | endif | |
| 3293 | EXTRA_libgnu_a_SOURCES += strnlen.c | ||
| 3294 | 3361 | ||
| 3295 | endif | 3362 | endif |
| 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 |
| 3299 | ifeq (,$(OMIT_GNULIB_MODULE_strtoimax)) | 3366 | ifeq (,$(OMIT_GNULIB_MODULE_strtoimax)) |
| 3300 | 3367 | ||
| 3301 | 3368 | ifneq (,$(GL_COND_OBJ_STRTOIMAX_CONDITION)) | |
| 3302 | EXTRA_DIST += strtoimax.c | 3369 | libgnu_a_SOURCES += strtoimax.c |
| 3303 | 3370 | endif | |
| 3304 | EXTRA_libgnu_a_SOURCES += strtoimax.c | ||
| 3305 | 3371 | ||
| 3306 | endif | 3372 | endif |
| 3307 | ## end gnulib module strtoimax | 3373 | ## end gnulib module strtoimax |
| @@ -3310,11 +3376,14 @@ endif | |||
| 3310 | ifeq (,$(OMIT_GNULIB_MODULE_strtoll)) | 3376 | ifeq (,$(OMIT_GNULIB_MODULE_strtoll)) |
| 3311 | 3377 | ||
| 3312 | ifneq (,$(gl_GNULIB_ENABLED_strtoll_CONDITION)) | 3378 | ifneq (,$(gl_GNULIB_ENABLED_strtoll_CONDITION)) |
| 3379 | ifneq (,$(GL_COND_OBJ_STRTOLL_CONDITION)) | ||
| 3380 | libgnu_a_SOURCES += strtoll.c | ||
| 3381 | endif | ||
| 3313 | 3382 | ||
| 3314 | endif | 3383 | endif |
| 3315 | EXTRA_DIST += strtol.c strtoll.c | 3384 | EXTRA_DIST += strtol.c |
| 3316 | 3385 | ||
| 3317 | EXTRA_libgnu_a_SOURCES += strtol.c strtoll.c | 3386 | EXTRA_libgnu_a_SOURCES += strtol.c |
| 3318 | 3387 | ||
| 3319 | endif | 3388 | endif |
| 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 |
| 3323 | ifeq (,$(OMIT_GNULIB_MODULE_symlink)) | 3392 | ifeq (,$(OMIT_GNULIB_MODULE_symlink)) |
| 3324 | 3393 | ||
| 3325 | 3394 | ifneq (,$(GL_COND_OBJ_SYMLINK_CONDITION)) | |
| 3326 | EXTRA_DIST += symlink.c | 3395 | libgnu_a_SOURCES += symlink.c |
| 3327 | 3396 | endif | |
| 3328 | EXTRA_libgnu_a_SOURCES += symlink.c | ||
| 3329 | 3397 | ||
| 3330 | endif | 3398 | endif |
| 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 |
| 3603 | ifeq (,$(OMIT_GNULIB_MODULE_time_r)) | 3671 | ifeq (,$(OMIT_GNULIB_MODULE_time_r)) |
| 3604 | 3672 | ||
| 3605 | 3673 | ifneq (,$(GL_COND_OBJ_TIME_R_CONDITION)) | |
| 3606 | EXTRA_DIST += time_r.c | 3674 | libgnu_a_SOURCES += time_r.c |
| 3607 | 3675 | endif | |
| 3608 | EXTRA_libgnu_a_SOURCES += time_r.c | ||
| 3609 | 3676 | ||
| 3610 | endif | 3677 | endif |
| 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 |
| 3614 | ifeq (,$(OMIT_GNULIB_MODULE_time_rz)) | 3681 | ifeq (,$(OMIT_GNULIB_MODULE_time_rz)) |
| 3615 | 3682 | ||
| 3683 | ifneq (,$(GL_COND_OBJ_TIME_RZ_CONDITION)) | ||
| 3684 | libgnu_a_SOURCES += time_rz.c | ||
| 3685 | endif | ||
| 3616 | 3686 | ||
| 3617 | EXTRA_DIST += time-internal.h time_rz.c | 3687 | EXTRA_DIST += time-internal.h |
| 3618 | |||
| 3619 | EXTRA_libgnu_a_SOURCES += time_rz.c | ||
| 3620 | 3688 | ||
| 3621 | endif | 3689 | endif |
| 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 |
| 3625 | ifeq (,$(OMIT_GNULIB_MODULE_timegm)) | 3693 | ifeq (,$(OMIT_GNULIB_MODULE_timegm)) |
| 3626 | 3694 | ||
| 3695 | ifneq (,$(GL_COND_OBJ_TIMEGM_CONDITION)) | ||
| 3696 | libgnu_a_SOURCES += timegm.c | ||
| 3697 | endif | ||
| 3627 | 3698 | ||
| 3628 | EXTRA_DIST += mktime-internal.h timegm.c | 3699 | EXTRA_DIST += mktime-internal.h |
| 3629 | |||
| 3630 | EXTRA_libgnu_a_SOURCES += timegm.c | ||
| 3631 | 3700 | ||
| 3632 | endif | 3701 | endif |
| 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 |
| 3910 | ifeq (,$(OMIT_GNULIB_MODULE_utimensat)) | 3980 | ifeq (,$(OMIT_GNULIB_MODULE_utimensat)) |
| 3911 | 3981 | ||
| 3982 | ifneq (,$(GL_COND_OBJ_UTIMENSAT_CONDITION)) | ||
| 3983 | libgnu_a_SOURCES += utimensat.c | ||
| 3984 | endif | ||
| 3912 | 3985 | ||
| 3913 | EXTRA_DIST += at-func.c utimensat.c | 3986 | EXTRA_DIST += at-func.c |
| 3914 | 3987 | ||
| 3915 | EXTRA_libgnu_a_SOURCES += at-func.c utimensat.c | 3988 | EXTRA_libgnu_a_SOURCES += at-func.c |
| 3916 | 3989 | ||
| 3917 | endif | 3990 | endif |
| 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 | : |
| 4030 | distclean-local: distclean-gnulib-libobjs | ||
| 4031 | distclean-gnulib-libobjs: | ||
| 4032 | -rm -f @gl_LIBOBJDEPS@ | ||
| 4033 | maintainer-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 | |||
| 10 | it under the terms of either: | 10 | it 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 | ||
| 16 | or | 16 | or |
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 | |||
| 8 | it under the terms of either: | 8 | it 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 | ||
| 14 | or | 14 | or |
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, |
| @@ -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, |