diff options
| author | YAMAMOTO Mitsuharu | 2019-04-27 18:33:39 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2019-04-27 18:33:39 +0900 |
| commit | 886bedb36c7b959b7e6fc8ce8e0c04e144b0ae28 (patch) | |
| tree | b5770d9fc10a704ad8aeb3474c6940121252c770 /lib | |
| parent | 015a6e1df2772bd43680df5cbeaffccf98a881da (diff) | |
| parent | 8dc00b2f1e6523c634df3e24379afbe712a32b27 (diff) | |
| download | emacs-886bedb36c7b959b7e6fc8ce8e0c04e144b0ae28.tar.gz emacs-886bedb36c7b959b7e6fc8ce8e0c04e144b0ae28.zip | |
Merge branch 'master' into harfbuzz
Diffstat (limited to 'lib')
161 files changed, 1136 insertions, 312 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in index 7dba31be711..ac32c7070f3 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ### @configure_input@ | 1 | ### @configure_input@ |
| 2 | 2 | ||
| 3 | # Copyright 2017-2018 Free Software Foundation, Inc. | 3 | # Copyright 2017-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | # This file is part of GNU Emacs. | 5 | # This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -84,7 +84,7 @@ Makefile: ../config.status $(srcdir)/Makefile.in | |||
| 84 | # and building it would just waste time. | 84 | # and building it would just waste time. |
| 85 | not_emacs_OBJECTS = regex.o | 85 | not_emacs_OBJECTS = regex.o |
| 86 | 86 | ||
| 87 | libgnu_a_OBJECTS = $(gl_LIBOBJS) \ | 87 | libgnu_a_OBJECTS = fingerprint.o $(gl_LIBOBJS) \ |
| 88 | $(patsubst %.c,%.o,$(filter %.c,$(libgnu_a_SOURCES))) | 88 | $(patsubst %.c,%.o,$(filter %.c,$(libgnu_a_SOURCES))) |
| 89 | for_emacs_OBJECTS = $(filter-out $(not_emacs_OBJECTS),$(libgnu_a_OBJECTS)) | 89 | for_emacs_OBJECTS = $(filter-out $(not_emacs_OBJECTS),$(libgnu_a_OBJECTS)) |
| 90 | libegnu_a_OBJECTS = $(patsubst %.o,e-%.o,$(for_emacs_OBJECTS)) | 90 | libegnu_a_OBJECTS = $(patsubst %.o,e-%.o,$(for_emacs_OBJECTS)) |
diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h index 94fdfaf0220..db9b45554c5 100644 --- a/lib/_Noreturn.h +++ b/lib/_Noreturn.h | |||
| @@ -1,8 +1,27 @@ | |||
| 1 | /* A C macro for declaring that a function does not return. | ||
| 2 | Copyright (C) 2011-2019 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify it | ||
| 5 | under the terms of the GNU General Public License as published | ||
| 6 | by the Free Software Foundation; either version 3 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 12 | General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 16 | |||
| 1 | #ifndef _Noreturn | 17 | #ifndef _Noreturn |
| 2 | # if 201103 <= (defined __cplusplus ? __cplusplus : 0) | 18 | # if (defined __cplusplus \ |
| 19 | && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ | ||
| 20 | || (defined _MSC_VER && 1900 <= _MSC_VER))) | ||
| 3 | # define _Noreturn [[noreturn]] | 21 | # define _Noreturn [[noreturn]] |
| 4 | # elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ | 22 | # elif ((!defined __cplusplus || defined __clang__) \ |
| 5 | || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)) | 23 | && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ |
| 24 | || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))) | ||
| 6 | /* _Noreturn works as-is. */ | 25 | /* _Noreturn works as-is. */ |
| 7 | # elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C | 26 | # elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C |
| 8 | # define _Noreturn __attribute__ ((__noreturn__)) | 27 | # define _Noreturn __attribute__ ((__noreturn__)) |
diff --git a/lib/acl-errno-valid.c b/lib/acl-errno-valid.c index 96577eb5e6b..99ddf3bb0c3 100644 --- a/lib/acl-errno-valid.c +++ b/lib/acl-errno-valid.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Test whether ACLs are well supported on this system. | 1 | /* Test whether ACLs are well supported on this system. |
| 2 | 2 | ||
| 3 | Copyright 2013-2018 Free Software Foundation, Inc. | 3 | Copyright 2013-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/acl-internal.c b/lib/acl-internal.c index 92e7b9bdf58..cc42183f443 100644 --- a/lib/acl-internal.c +++ b/lib/acl-internal.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*- | 1 | /* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2002-2003, 2005-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002-2003, 2005-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/acl-internal.h b/lib/acl-internal.h index 2da7c5a0366..05833efaa89 100644 --- a/lib/acl-internal.h +++ b/lib/acl-internal.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Internal implementation of access control lists. -*- coding: utf-8 -*- | 1 | /* Internal implementation of access control lists. -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2002-2003, 2005-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002-2003, 2005-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* acl.c - access control lists | 1 | /* acl.c - access control lists |
| 2 | 2 | ||
| 3 | Copyright (C) 2002, 2008-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002, 2008-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/acl_entries.c b/lib/acl_entries.c index ce730d466e1..19ac3c3bd9f 100644 --- a/lib/acl_entries.c +++ b/lib/acl_entries.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Return the number of entries in an ACL. | 1 | /* Return the number of entries in an ACL. |
| 2 | 2 | ||
| 3 | Copyright (C) 2002-2003, 2005-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002-2003, 2005-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 5ad8af8b411..a581d58f834 100644 --- a/lib/alloca.in.h +++ b/lib/alloca.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Memory allocation on the stack. | 1 | /* Memory allocation on the stack. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995, 1999, 2001-2004, 2006-2018 Free Software Foundation, | 3 | Copyright (C) 1995, 1999, 2001-2004, 2006-2019 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
| @@ -36,6 +36,12 @@ | |||
| 36 | 36 | ||
| 37 | #ifndef alloca | 37 | #ifndef alloca |
| 38 | # ifdef __GNUC__ | 38 | # ifdef __GNUC__ |
| 39 | /* Some version of mingw have an <alloca.h> that causes trouble when | ||
| 40 | included after 'alloca' gets defined as a macro. As a workaround, include | ||
| 41 | this <alloca.h> first and define 'alloca' as a macro afterwards. */ | ||
| 42 | # if (defined _WIN32 && ! defined __CYGWIN__) && @HAVE_ALLOCA_H@ | ||
| 43 | # include_next <alloca.h> | ||
| 44 | # endif | ||
| 39 | # define alloca __builtin_alloca | 45 | # define alloca __builtin_alloca |
| 40 | # elif defined _AIX | 46 | # elif defined _AIX |
| 41 | # define alloca __alloca | 47 | # define alloca __alloca |
diff --git a/lib/allocator.h b/lib/allocator.h index ab312f514ee..5a632ba6ff3 100644 --- a/lib/allocator.h +++ b/lib/allocator.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Memory allocators such as malloc+free. | 1 | /* Memory allocators such as malloc+free. |
| 2 | 2 | ||
| 3 | Copyright (C) 2011-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/arg-nonnull.h b/lib/arg-nonnull.h index 5f034083129..ad8c26c225e 100644 --- a/lib/arg-nonnull.h +++ b/lib/arg-nonnull.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A C macro for declaring that specific arguments must not be NULL. | 1 | /* A C macro for declaring that specific arguments must not be NULL. |
| 2 | Copyright (C) 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2019 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify it | 4 | This program is free software: you can redistribute it and/or modify it |
| 5 | under the terms of the GNU General Public License as published | 5 | under the terms of the GNU General Public License as published |
diff --git a/lib/at-func.c b/lib/at-func.c index 55e4b8c0eb0..d2e63191afe 100644 --- a/lib/at-func.c +++ b/lib/at-func.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Define at-style functions like fstatat, unlinkat, fchownat, etc. | 1 | /* Define at-style functions like fstatat, unlinkat, fchownat, etc. |
| 2 | Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/binary-io.c b/lib/binary-io.c index f9cc4dd2ec6..01e0bf64765 100644 --- a/lib/binary-io.c +++ b/lib/binary-io.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Binary mode I/O. | 1 | /* Binary mode I/O. |
| 2 | Copyright 2017-2018 Free Software Foundation, Inc. | 2 | Copyright 2017-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/binary-io.h b/lib/binary-io.h index 1f21fc051f6..720b08c7551 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Binary mode I/O. | 1 | /* Binary mode I/O. |
| 2 | Copyright (C) 2001, 2003, 2005, 2008-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2001, 2003, 2005, 2008-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/byteswap.in.h b/lib/byteswap.in.h index 547e384e325..273855dbdeb 100644 --- a/lib/byteswap.in.h +++ b/lib/byteswap.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* byteswap.h - Byte swapping | 1 | /* byteswap.h - Byte swapping |
| 2 | Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2005, 2007, 2009-2019 Free Software Foundation, Inc. |
| 3 | Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005. | 3 | Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/c++defs.h b/lib/c++defs.h index 72ff1ffa519..87d0716723e 100644 --- a/lib/c++defs.h +++ b/lib/c++defs.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* C++ compatible function declaration macros. | 1 | /* C++ compatible function declaration macros. |
| 2 | Copyright (C) 2010-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2010-2019 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify it | 4 | This program is free software: you can redistribute it and/or modify it |
| 5 | under the terms of the GNU General Public License as published | 5 | under the terms of the GNU General Public License as published |
diff --git a/lib/c-ctype.h b/lib/c-ctype.h index d55d4f64e4f..4d521763843 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | <ctype.h> functions' behaviour depends on the current locale set via | 5 | <ctype.h> functions' behaviour depends on the current locale set via |
| 6 | setlocale. | 6 | setlocale. |
| 7 | 7 | ||
| 8 | Copyright (C) 2000-2003, 2006, 2008-2018 Free Software Foundation, Inc. | 8 | Copyright (C) 2000-2003, 2006, 2008-2019 Free Software Foundation, Inc. |
| 9 | 9 | ||
| 10 | This program is free software; you can redistribute it and/or modify | 10 | This program is free software; you can redistribute it and/or modify |
| 11 | it under the terms of the GNU General Public License as published by | 11 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/c-strcase.h b/lib/c-strcase.h index 41f439e8de7..b67c9b5da0e 100644 --- a/lib/c-strcase.h +++ b/lib/c-strcase.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Case-insensitive string comparison functions in C locale. | 1 | /* Case-insensitive string comparison functions in C locale. |
| 2 | Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2018 Free Software | 2 | Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2019 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c index 2b1ac99bb60..ec50f1abe76 100644 --- a/lib/c-strcasecmp.c +++ b/lib/c-strcasecmp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* c-strcasecmp.c -- case insensitive string comparator in C locale | 1 | /* c-strcasecmp.c -- case insensitive string comparator in C locale |
| 2 | Copyright (C) 1998-1999, 2005-2006, 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1998-1999, 2005-2006, 2009-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c index 8151c1a8340..513c353f6c2 100644 --- a/lib/c-strncasecmp.c +++ b/lib/c-strncasecmp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* c-strncasecmp.c -- case insensitive string comparator in C locale | 1 | /* c-strncasecmp.c -- case insensitive string comparator in C locale |
| 2 | Copyright (C) 1998-1999, 2005-2006, 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1998-1999, 2005-2006, 2009-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index b5ae905d2e5..e56d5030856 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Read symbolic links into a buffer without size limitation, relative to fd. | 1 | /* Read symbolic links into a buffer without size limitation, relative to fd. |
| 2 | 2 | ||
| 3 | Copyright (C) 2001, 2003-2004, 2007, 2009-2018 Free Software Foundation, | 3 | Copyright (C) 2001, 2003-2004, 2007, 2009-2019 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h index 051d3edea2d..68b69aa8893 100644 --- a/lib/careadlinkat.h +++ b/lib/careadlinkat.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Read symbolic links into a buffer without size limitation, relative to fd. | 1 | /* Read symbolic links into a buffer without size limitation, relative to fd. |
| 2 | 2 | ||
| 3 | Copyright (C) 2011-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/cdefs.h b/lib/cdefs.h index 2d620cccaff..96d26164199 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1992-2018 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2019 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| @@ -139,7 +139,7 @@ | |||
| 139 | Headers that should use flexible arrays only if they're "real" | 139 | Headers that should use flexible arrays only if they're "real" |
| 140 | (e.g. only if they won't affect sizeof()) should test | 140 | (e.g. only if they won't affect sizeof()) should test |
| 141 | #if __glibc_c99_flexarr_available. */ | 141 | #if __glibc_c99_flexarr_available. */ |
| 142 | #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L | 142 | #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc |
| 143 | # define __flexarr [] | 143 | # define __flexarr [] |
| 144 | # define __glibc_c99_flexarr_available 1 | 144 | # define __glibc_c99_flexarr_available 1 |
| 145 | #elif __GNUC_PREREQ (2,97) | 145 | #elif __GNUC_PREREQ (2,97) |
| @@ -340,7 +340,7 @@ | |||
| 340 | semantics. | 340 | semantics. |
| 341 | 341 | ||
| 342 | clang++ identifies itself as gcc-4.2, but has support for GNU inlining | 342 | clang++ identifies itself as gcc-4.2, but has support for GNU inlining |
| 343 | semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and | 343 | semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and |
| 344 | __GNUC_GNU_INLINE__ macro definitions. */ | 344 | __GNUC_GNU_INLINE__ macro definitions. */ |
| 345 | #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ | 345 | #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ |
| 346 | || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ | 346 | || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ |
diff --git a/lib/cloexec.c b/lib/cloexec.c index 238ab188866..db425766a0e 100644 --- a/lib/cloexec.c +++ b/lib/cloexec.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag | 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag |
| 2 | 2 | ||
| 3 | Copyright (C) 1991, 2004-2006, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1991, 2004-2006, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/cloexec.h b/lib/cloexec.h index 59028058e6d..06ad945d8e2 100644 --- a/lib/cloexec.h +++ b/lib/cloexec.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag | 1 | /* cloexec.c - set or clear the close-on-exec descriptor flag |
| 2 | 2 | ||
| 3 | Copyright (C) 2004, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/close-stream.c b/lib/close-stream.c index 3d5a52ebd85..5458c4f29f3 100644 --- a/lib/close-stream.c +++ b/lib/close-stream.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Close a stream, with nicer error checking than fclose's. | 1 | /* Close a stream, with nicer error checking than fclose's. |
| 2 | 2 | ||
| 3 | Copyright (C) 1998-2002, 2004, 2006-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1998-2002, 2004, 2006-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h index efb08517011..e5ac2e12606 100644 --- a/lib/count-leading-zeros.h +++ b/lib/count-leading-zeros.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* count-leading-zeros.h -- counts the number of leading 0 bits in a word. | 1 | /* count-leading-zeros.h -- counts the number of leading 0 bits in a word. |
| 2 | Copyright (C) 2012-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2012-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/count-one-bits.h b/lib/count-one-bits.h index ae1872b8d33..00569941885 100644 --- a/lib/count-one-bits.h +++ b/lib/count-one-bits.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* count-one-bits.h -- counts the number of 1-bits in a word. | 1 | /* count-one-bits.h -- counts the number of 1-bits in a word. |
| 2 | Copyright (C) 2007-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/count-trailing-zeros.h b/lib/count-trailing-zeros.h index a4c78485c84..3f78696e30f 100644 --- a/lib/count-trailing-zeros.h +++ b/lib/count-trailing-zeros.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* count-trailing-zeros.h -- counts the number of trailing 0 bits in a word. | 1 | /* count-trailing-zeros.h -- counts the number of trailing 0 bits in a word. |
| 2 | Copyright 2013-2018 Free Software Foundation, Inc. | 2 | Copyright 2013-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/diffseq.h b/lib/diffseq.h index 9244729380d..c6aac3d8120 100644 --- a/lib/diffseq.h +++ b/lib/diffseq.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Analyze differences between two vectors. | 1 | /* Analyze differences between two vectors. |
| 2 | 2 | ||
| 3 | Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2018 Free Software | 3 | Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/dirent.in.h b/lib/dirent.in.h index 2ab25af68f0..a3c8eb341e9 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A GNU-like <dirent.h>. | 1 | /* A GNU-like <dirent.h>. |
| 2 | Copyright (C) 2006-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2006-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/dirfd.c b/lib/dirfd.c index 19c80468bcf..bc858fd09dd 100644 --- a/lib/dirfd.c +++ b/lib/dirfd.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* dirfd.c -- return the file descriptor associated with an open DIR* | 1 | /* dirfd.c -- return the file descriptor associated with an open DIR* |
| 2 | 2 | ||
| 3 | Copyright (C) 2001, 2006, 2008-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2001, 2006, 2008-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/dosname.h b/lib/dosname.h index fef3b6daa1f..c0ab6848a58 100644 --- a/lib/dosname.h +++ b/lib/dosname.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* File names on MS-DOS/Windows systems. | 1 | /* File names on MS-DOS/Windows systems. |
| 2 | 2 | ||
| 3 | Copyright (C) 2000-2001, 2004-2006, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2000-2001, 2004-2006, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/dtotimespec.c b/lib/dtotimespec.c index dcbd28051cf..a8ff04a9859 100644 --- a/lib/dtotimespec.c +++ b/lib/dtotimespec.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Convert double to timespec. | 1 | /* Convert double to timespec. |
| 2 | 2 | ||
| 3 | Copyright (C) 2011-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/dup2.c b/lib/dup2.c index c7d176728d4..d3aafa458b5 100644 --- a/lib/dup2.c +++ b/lib/dup2.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Duplicate an open file descriptor to a specified file descriptor. | 1 | /* Duplicate an open file descriptor to a specified file descriptor. |
| 2 | 2 | ||
| 3 | Copyright (C) 1999, 2004-2007, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1999, 2004-2007, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/errno.in.h b/lib/errno.in.h index b95c4e9ce76..3bd27f1cc9f 100644 --- a/lib/errno.in.h +++ b/lib/errno.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A POSIX-like <errno.h>. | 1 | /* A POSIX-like <errno.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2008-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2008-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/euidaccess.c b/lib/euidaccess.c index de5d82b52d5..fece4cfc5e0 100644 --- a/lib/euidaccess.c +++ b/lib/euidaccess.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* euidaccess -- check if effective user id can access file | 1 | /* euidaccess -- check if effective user id can access file |
| 2 | 2 | ||
| 3 | Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2018 Free | 3 | Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2019 Free |
| 4 | Software Foundation, Inc. | 4 | Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of the GNU C Library. | 6 | This file is part of the GNU C Library. |
diff --git a/lib/execinfo.in.h b/lib/execinfo.in.h index 83e1b285528..def124e2e9b 100644 --- a/lib/execinfo.in.h +++ b/lib/execinfo.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Information about executables. | 1 | /* Information about executables. |
| 2 | 2 | ||
| 3 | Copyright (C) 2012-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2012-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/explicit_bzero.c b/lib/explicit_bzero.c index 79b7fd66b66..79ef1860fb7 100644 --- a/lib/explicit_bzero.c +++ b/lib/explicit_bzero.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Erasure of sensitive data, generic implementation. | 1 | /* Erasure of sensitive data, generic implementation. |
| 2 | Copyright (C) 2016-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2016-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/lib/faccessat.c b/lib/faccessat.c index 8aab7863cdd..6c63e61d83f 100644 --- a/lib/faccessat.c +++ b/lib/faccessat.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Check the access rights of a file relative to an open directory. | 1 | /* Check the access rights of a file relative to an open directory. |
| 2 | Copyright (C) 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/fcntl.c b/lib/fcntl.c index 74e0f5d3910..51f62ef78a8 100644 --- a/lib/fcntl.c +++ b/lib/fcntl.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Provide file descriptor control. | 1 | /* Provide file descriptor control. |
| 2 | 2 | ||
| 3 | Copyright (C) 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -545,7 +545,7 @@ rpl_fcntl_DUPFD_CLOEXEC (int fd, int target) | |||
| 545 | #ifdef __KLIBC__ | 545 | #ifdef __KLIBC__ |
| 546 | 546 | ||
| 547 | static int | 547 | static int |
| 548 | klibc_fcntl (int fd, int action, /* arg */...); | 548 | klibc_fcntl (int fd, int action, /* arg */...) |
| 549 | { | 549 | { |
| 550 | va_list arg_ptr; | 550 | va_list arg_ptr; |
| 551 | int arg; | 551 | int arg; |
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index a1e7d35c1b9..eb70dc61eca 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Like <fcntl.h>, but with non-working flags defined to 0. | 1 | /* Like <fcntl.h>, but with non-working flags defined to 0. |
| 2 | 2 | ||
| 3 | Copyright (C) 2006-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2006-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/fdopendir.c b/lib/fdopendir.c index 9adefd210b5..b65588ac97e 100644 --- a/lib/fdopendir.c +++ b/lib/fdopendir.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* provide a replacement fdopendir function | 1 | /* provide a replacement fdopendir function |
| 2 | Copyright (C) 2004-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2004-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/filemode.c b/lib/filemode.c index 574e9941646..71f2b8237a3 100644 --- a/lib/filemode.c +++ b/lib/filemode.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* filemode.c -- make a string describing file modes | 1 | /* filemode.c -- make a string describing file modes |
| 2 | 2 | ||
| 3 | Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2018 Free | 3 | Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2019 Free |
| 4 | Software Foundation, Inc. | 4 | Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/filemode.h b/lib/filemode.h index f9d1d21990e..5ae9da0ebe3 100644 --- a/lib/filemode.h +++ b/lib/filemode.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Make a string describing file modes. | 1 | /* Make a string describing file modes. |
| 2 | 2 | ||
| 3 | Copyright (C) 1998-1999, 2003, 2006, 2009-2018 Free Software Foundation, | 3 | Copyright (C) 1998-1999, 2003, 2006, 2009-2019 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/filevercmp.c b/lib/filevercmp.c index 9e9b4408cdc..aebe08817b2 100644 --- a/lib/filevercmp.c +++ b/lib/filevercmp.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk> | 2 | Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk> |
| 3 | Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au> | 3 | Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au> |
| 4 | Copyright (C) 2008-2018 Free Software Foundation, Inc. | 4 | Copyright (C) 2008-2019 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/filevercmp.h b/lib/filevercmp.h index 5e594568c5b..23766f0ce7c 100644 --- a/lib/filevercmp.h +++ b/lib/filevercmp.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk> | 2 | Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk> |
| 3 | Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au> | 3 | Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au> |
| 4 | Copyright (C) 2008-2018 Free Software Foundation, Inc. | 4 | Copyright (C) 2008-2019 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/fingerprint.c b/lib/fingerprint.c new file mode 100644 index 00000000000..e55de9c6da3 --- /dev/null +++ b/lib/fingerprint.c | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | /* Placeholder fingerprint for Emacs | ||
| 2 | |||
| 3 | Copyright 2019 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or (at | ||
| 10 | your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 19 | |||
| 20 | #include <config.h> | ||
| 21 | |||
| 22 | #include "fingerprint.h" | ||
| 23 | |||
| 24 | /* This random fingerprint was generated by the shell command: | ||
| 25 | |||
| 26 | shuf -i 0-255 -n 32 -r | awk '{printf " 0x%.02X,\n", $0}' | ||
| 27 | |||
| 28 | In the final Emacs executable, this random fingerprint is replaced | ||
| 29 | by a fingerprint of the temporary Emacs executable that was built | ||
| 30 | along the way. */ | ||
| 31 | |||
| 32 | unsigned char const fingerprint[] = | ||
| 33 | { | ||
| 34 | 0xDE, | ||
| 35 | 0x86, | ||
| 36 | 0xBB, | ||
| 37 | 0x99, | ||
| 38 | 0xFF, | ||
| 39 | 0xF5, | ||
| 40 | 0x46, | ||
| 41 | 0x9A, | ||
| 42 | 0x9E, | ||
| 43 | 0x3F, | ||
| 44 | 0x9F, | ||
| 45 | 0x5D, | ||
| 46 | 0x9A, | ||
| 47 | 0xDF, | ||
| 48 | 0xF0, | ||
| 49 | 0x91, | ||
| 50 | 0xBD, | ||
| 51 | 0xCD, | ||
| 52 | 0xC1, | ||
| 53 | 0xE8, | ||
| 54 | 0x0C, | ||
| 55 | 0x16, | ||
| 56 | 0x1E, | ||
| 57 | 0xAF, | ||
| 58 | 0xB8, | ||
| 59 | 0x6C, | ||
| 60 | 0xE2, | ||
| 61 | 0x2B, | ||
| 62 | 0xB1, | ||
| 63 | 0x24, | ||
| 64 | 0xCE, | ||
| 65 | 0xB0, | ||
| 66 | }; | ||
diff --git a/lib/fingerprint.h b/lib/fingerprint.h new file mode 100644 index 00000000000..0b195fd0ca7 --- /dev/null +++ b/lib/fingerprint.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* Header file for the Emacs build fingerprint. | ||
| 2 | |||
| 3 | Copyright (C) 2016, 2018-2019 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or (at | ||
| 10 | your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 19 | |||
| 20 | #ifndef EMACS_FINGERPRINT_H | ||
| 21 | #define EMACS_FINGERPRINT_H | ||
| 22 | |||
| 23 | /* We generate fingerprint.c and fingerprint.o from all the sources in | ||
| 24 | Emacs. This way, we have a unique value that we can use to pair | ||
| 25 | data files (like a portable dump image) with a specific build of | ||
| 26 | Emacs. */ | ||
| 27 | extern unsigned char const fingerprint[32]; | ||
| 28 | |||
| 29 | #endif | ||
diff --git a/lib/flexmember.h b/lib/flexmember.h index 7e3f59837bb..0d65f6da60f 100644 --- a/lib/flexmember.h +++ b/lib/flexmember.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Sizes of structs with flexible array members. | 1 | /* Sizes of structs with flexible array members. |
| 2 | 2 | ||
| 3 | Copyright 2016-2018 Free Software Foundation, Inc. | 3 | Copyright 2016-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of the GNU C Library. | 5 | This file is part of the GNU C Library. |
| 6 | 6 | ||
diff --git a/lib/fpending.c b/lib/fpending.c index de370d4b10f..3c01285bb83 100644 --- a/lib/fpending.c +++ b/lib/fpending.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* fpending.c -- return the number of pending output bytes on a stream | 1 | /* fpending.c -- return the number of pending output bytes on a stream |
| 2 | Copyright (C) 2000, 2004, 2006-2007, 2009-2018 Free Software Foundation, | 2 | Copyright (C) 2000, 2004, 2006-2007, 2009-2019 Free Software Foundation, |
| 3 | Inc. | 3 | Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/fpending.h b/lib/fpending.h index 2ff26bc6afc..097a3ef0717 100644 --- a/lib/fpending.h +++ b/lib/fpending.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Declare __fpending. | 1 | /* Declare __fpending. |
| 2 | 2 | ||
| 3 | Copyright (C) 2000, 2003, 2005-2006, 2009-2018 Free Software Foundation, | 3 | Copyright (C) 2000, 2003, 2005-2006, 2009-2019 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/fstatat.c b/lib/fstatat.c index 63ceceb6d86..019d3c61638 100644 --- a/lib/fstatat.c +++ b/lib/fstatat.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Work around an fstatat bug on Solaris 9. | 1 | /* Work around an fstatat bug on Solaris 9. |
| 2 | 2 | ||
| 3 | Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -36,10 +36,14 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags) | |||
| 36 | } | 36 | } |
| 37 | #endif | 37 | #endif |
| 38 | 38 | ||
| 39 | #ifdef __osf__ | ||
| 39 | /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc | 40 | /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc |
| 40 | eliminates this include because of the preliminary #include <sys/stat.h> | 41 | eliminates this include because of the preliminary #include <sys/stat.h> |
| 41 | above. */ | 42 | above. */ |
| 42 | #include "sys/stat.h" | 43 | # include "sys/stat.h" |
| 44 | #else | ||
| 45 | # include <sys/stat.h> | ||
| 46 | #endif | ||
| 43 | 47 | ||
| 44 | #include "stat-time.h" | 48 | #include "stat-time.h" |
| 45 | 49 | ||
diff --git a/lib/fsusage.c b/lib/fsusage.c index 17daf9144a5..7ddeb52fc0f 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* fsusage.c -- return space usage of mounted file systems | 1 | /* fsusage.c -- return space usage of mounted file systems |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2018 Free Software | 3 | Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/fsusage.h b/lib/fsusage.h index 65daa736765..1d550bc451a 100644 --- a/lib/fsusage.h +++ b/lib/fsusage.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* fsusage.h -- declarations for file system space usage info | 1 | /* fsusage.h -- declarations for file system space usage info |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2018 Free Software | 3 | Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/fsync.c b/lib/fsync.c index ecacb0ba25e..bfb6d28a5cf 100644 --- a/lib/fsync.c +++ b/lib/fsync.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | Written by Richard W.M. Jones <rjones.at.redhat.com> | 8 | Written by Richard W.M. Jones <rjones.at.redhat.com> |
| 9 | 9 | ||
| 10 | Copyright (C) 2008-2018 Free Software Foundation, Inc. | 10 | Copyright (C) 2008-2019 Free Software Foundation, Inc. |
| 11 | 11 | ||
| 12 | This library is free software; you can redistribute it and/or | 12 | This library is free software; you can redistribute it and/or |
| 13 | modify it under the terms of the GNU General Public | 13 | modify it under the terms of the GNU General Public |
diff --git a/lib/ftoastr.c b/lib/ftoastr.c index a6899b2c63c..55f1e02e80f 100644 --- a/lib/ftoastr.c +++ b/lib/ftoastr.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* floating point to accurate string | 1 | /* floating point to accurate string |
| 2 | 2 | ||
| 3 | Copyright (C) 2010-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2010-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -40,9 +40,7 @@ | |||
| 40 | # define FLOAT_PREC_BOUND _GL_LDBL_PREC_BOUND | 40 | # define FLOAT_PREC_BOUND _GL_LDBL_PREC_BOUND |
| 41 | # define FTOASTR ldtoastr | 41 | # define FTOASTR ldtoastr |
| 42 | # define PROMOTED_FLOAT long double | 42 | # define PROMOTED_FLOAT long double |
| 43 | # if HAVE_C99_STRTOLD | 43 | # define STRTOF strtold |
| 44 | # define STRTOF strtold | ||
| 45 | # endif | ||
| 46 | #elif LENGTH == 2 | 44 | #elif LENGTH == 2 |
| 47 | # define FLOAT double | 45 | # define FLOAT double |
| 48 | # define FLOAT_DIG DBL_DIG | 46 | # define FLOAT_DIG DBL_DIG |
| @@ -63,7 +61,7 @@ | |||
| 63 | # endif | 61 | # endif |
| 64 | #endif | 62 | #endif |
| 65 | 63 | ||
| 66 | /* On pre-C99 hosts, approximate strtof and strtold with strtod. This | 64 | /* On pre-C99 hosts, approximate strtof with strtod. This |
| 67 | may generate one or two extra digits, but that's better than not | 65 | may generate one or two extra digits, but that's better than not |
| 68 | working at all. */ | 66 | working at all. */ |
| 69 | #ifndef STRTOF | 67 | #ifndef STRTOF |
diff --git a/lib/ftoastr.h b/lib/ftoastr.h index 2d783587bd1..752e3c40c54 100644 --- a/lib/ftoastr.h +++ b/lib/ftoastr.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* floating point to accurate string | 1 | /* floating point to accurate string |
| 2 | 2 | ||
| 3 | Copyright (C) 2010-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2010-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/get-permissions.c b/lib/get-permissions.c index 3b984510955..99b4664aae7 100644 --- a/lib/get-permissions.c +++ b/lib/get-permissions.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Get permissions of a file. -*- coding: utf-8 -*- | 1 | /* Get permissions of a file. -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2002-2003, 2005-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002-2003, 2005-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c index ac05bc483cc..03a92435f0b 100644 --- a/lib/getdtablesize.c +++ b/lib/getdtablesize.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getdtablesize() function: Return maximum possible file descriptor value + 1. | 1 | /* getdtablesize() function: Return maximum possible file descriptor value + 1. |
| 2 | Copyright (C) 2008-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2019 Free Software Foundation, Inc. |
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/getgroups.c b/lib/getgroups.c index cd6f4d70009..d8c77e9a650 100644 --- a/lib/getgroups.c +++ b/lib/getgroups.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* provide consistent interface to getgroups for systems that don't allow N==0 | 1 | /* provide consistent interface to getgroups for systems that don't allow N==0 |
| 2 | 2 | ||
| 3 | Copyright (C) 1996, 1999, 2003, 2006-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1996, 1999, 2003, 2006-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/getloadavg.c b/lib/getloadavg.c index 4e7eb0d2338..08c14efcfce 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Get the system load averages. | 1 | /* Get the system load averages. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2018 Free Software | 3 | Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | NOTE: The canonical source of this file is maintained with gnulib. | 6 | NOTE: The canonical source of this file is maintained with gnulib. |
| @@ -47,8 +47,8 @@ | |||
| 47 | N_NAME_POINTER The nlist n_name element is a pointer, | 47 | N_NAME_POINTER The nlist n_name element is a pointer, |
| 48 | not an array. | 48 | not an array. |
| 49 | HAVE_STRUCT_NLIST_N_UN_N_NAME 'n_un.n_name' is member of 'struct nlist'. | 49 | HAVE_STRUCT_NLIST_N_UN_N_NAME 'n_un.n_name' is member of 'struct nlist'. |
| 50 | LINUX_LDAV_FILE [__linux__, __CYGWIN__]: File containing | 50 | LINUX_LDAV_FILE [__linux__, __ANDROID__, __CYGWIN__]: File |
| 51 | load averages. | 51 | containing load averages. |
| 52 | 52 | ||
| 53 | Specific system predefines this file uses, aside from setting | 53 | Specific system predefines this file uses, aside from setting |
| 54 | default values if not emacs: | 54 | default values if not emacs: |
| @@ -65,7 +65,7 @@ | |||
| 65 | UMAX4_3 | 65 | UMAX4_3 |
| 66 | VMS | 66 | VMS |
| 67 | _WIN32 Native Windows (possibly also defined on Cygwin) | 67 | _WIN32 Native Windows (possibly also defined on Cygwin) |
| 68 | __linux__ Linux: assumes /proc file system mounted. | 68 | __linux__, __ANDROID__ Linux: assumes /proc file system mounted. |
| 69 | Support from Michael K. Johnson. | 69 | Support from Michael K. Johnson. |
| 70 | __CYGWIN__ Cygwin emulates linux /proc/loadavg. | 70 | __CYGWIN__ Cygwin emulates linux /proc/loadavg. |
| 71 | __NetBSD__ NetBSD: assumes /kern file system mounted. | 71 | __NetBSD__ NetBSD: assumes /kern file system mounted. |
| @@ -263,7 +263,7 @@ | |||
| 263 | # ifdef LOAD_AVE_TYPE | 263 | # ifdef LOAD_AVE_TYPE |
| 264 | 264 | ||
| 265 | # ifndef __VMS | 265 | # ifndef __VMS |
| 266 | # ifndef __linux__ | 266 | # if !(defined __linux__ || defined __ANDROID__) |
| 267 | # ifndef NLIST_STRUCT | 267 | # ifndef NLIST_STRUCT |
| 268 | # include <a.out.h> | 268 | # include <a.out.h> |
| 269 | # else /* NLIST_STRUCT */ | 269 | # else /* NLIST_STRUCT */ |
| @@ -286,7 +286,7 @@ | |||
| 286 | # ifndef LDAV_SYMBOL | 286 | # ifndef LDAV_SYMBOL |
| 287 | # define LDAV_SYMBOL "_avenrun" | 287 | # define LDAV_SYMBOL "_avenrun" |
| 288 | # endif /* LDAV_SYMBOL */ | 288 | # endif /* LDAV_SYMBOL */ |
| 289 | # endif /* __linux__ */ | 289 | # endif /* __linux__ || __ANDROID__ */ |
| 290 | 290 | ||
| 291 | # else /* __VMS */ | 291 | # else /* __VMS */ |
| 292 | 292 | ||
| @@ -359,7 +359,8 @@ | |||
| 359 | # include <sys/dg_sys_info.h> | 359 | # include <sys/dg_sys_info.h> |
| 360 | # endif | 360 | # endif |
| 361 | 361 | ||
| 362 | # if (defined __linux__ || defined __CYGWIN__ || defined SUNOS_5 \ | 362 | # if (defined __linux__ || defined __ANDROID__ \ |
| 363 | || defined __CYGWIN__ || defined SUNOS_5 \ | ||
| 363 | || (defined LOAD_AVE_TYPE && ! defined __VMS)) | 364 | || (defined LOAD_AVE_TYPE && ! defined __VMS)) |
| 364 | # include <fcntl.h> | 365 | # include <fcntl.h> |
| 365 | # endif | 366 | # endif |
| @@ -388,7 +389,7 @@ static bool getloadavg_initialized; | |||
| 388 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ | 389 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ |
| 389 | static long offset; | 390 | static long offset; |
| 390 | 391 | ||
| 391 | # if ! defined __VMS && ! defined sgi && ! defined __linux__ | 392 | # if ! defined __VMS && ! defined sgi && ! (defined __linux__ || defined __ANDROID__) |
| 392 | static struct nlist name_list[2]; | 393 | static struct nlist name_list[2]; |
| 393 | # endif | 394 | # endif |
| 394 | 395 | ||
| @@ -423,17 +424,17 @@ getloadavg (double loadavg[], int nelem) | |||
| 423 | int saved_errno; | 424 | int saved_errno; |
| 424 | 425 | ||
| 425 | kc = kstat_open (); | 426 | kc = kstat_open (); |
| 426 | if (kc == 0) | 427 | if (kc == NULL) |
| 427 | return -1; | 428 | return -1; |
| 428 | ksp = kstat_lookup (kc, "unix", 0, "system_misc"); | 429 | ksp = kstat_lookup (kc, "unix", 0, "system_misc"); |
| 429 | if (ksp == 0) | 430 | if (ksp == NULL) |
| 430 | return -1; | 431 | return -1; |
| 431 | if (kstat_read (kc, ksp, 0) == -1) | 432 | if (kstat_read (kc, ksp, 0) == -1) |
| 432 | return -1; | 433 | return -1; |
| 433 | 434 | ||
| 434 | 435 | ||
| 435 | kn = kstat_data_lookup (ksp, "avenrun_1min"); | 436 | kn = kstat_data_lookup (ksp, "avenrun_1min"); |
| 436 | if (kn == 0) | 437 | if (kn == NULL) |
| 437 | { | 438 | { |
| 438 | /* Return -1 if no load average information is available. */ | 439 | /* Return -1 if no load average information is available. */ |
| 439 | nelem = 0; | 440 | nelem = 0; |
| @@ -446,14 +447,14 @@ getloadavg (double loadavg[], int nelem) | |||
| 446 | if (nelem >= 2) | 447 | if (nelem >= 2) |
| 447 | { | 448 | { |
| 448 | kn = kstat_data_lookup (ksp, "avenrun_5min"); | 449 | kn = kstat_data_lookup (ksp, "avenrun_5min"); |
| 449 | if (kn != 0) | 450 | if (kn != NULL) |
| 450 | { | 451 | { |
| 451 | loadavg[elem++] = (double) kn->value.ul / FSCALE; | 452 | loadavg[elem++] = (double) kn->value.ul / FSCALE; |
| 452 | 453 | ||
| 453 | if (nelem >= 3) | 454 | if (nelem >= 3) |
| 454 | { | 455 | { |
| 455 | kn = kstat_data_lookup (ksp, "avenrun_15min"); | 456 | kn = kstat_data_lookup (ksp, "avenrun_15min"); |
| 456 | if (kn != 0) | 457 | if (kn != NULL) |
| 457 | loadavg[elem++] = (double) kn->value.ul / FSCALE; | 458 | loadavg[elem++] = (double) kn->value.ul / FSCALE; |
| 458 | } | 459 | } |
| 459 | } | 460 | } |
| @@ -498,8 +499,8 @@ getloadavg (double loadavg[], int nelem) | |||
| 498 | } | 499 | } |
| 499 | # endif | 500 | # endif |
| 500 | 501 | ||
| 501 | # if !defined (LDAV_DONE) && (defined (__linux__) || defined (__CYGWIN__)) | 502 | # if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__ || defined __CYGWIN__) |
| 502 | /* Linux without glibc, Cygwin */ | 503 | /* Linux without glibc, Android, Cygwin */ |
| 503 | # define LDAV_DONE | 504 | # define LDAV_DONE |
| 504 | # undef LOAD_AVE_TYPE | 505 | # undef LOAD_AVE_TYPE |
| 505 | 506 | ||
| @@ -554,7 +555,7 @@ getloadavg (double loadavg[], int nelem) | |||
| 554 | 555 | ||
| 555 | return elem; | 556 | return elem; |
| 556 | 557 | ||
| 557 | # endif /* __linux__ || __CYGWIN__ */ | 558 | # endif /* __linux__ || __ANDROID__ || __CYGWIN__ */ |
| 558 | 559 | ||
| 559 | # if !defined (LDAV_DONE) && defined (__NetBSD__) /* NetBSD < 0.9 */ | 560 | # if !defined (LDAV_DONE) && defined (__NetBSD__) /* NetBSD < 0.9 */ |
| 560 | # define LDAV_DONE | 561 | # define LDAV_DONE |
| @@ -894,7 +895,7 @@ getloadavg (double loadavg[], int nelem) | |||
| 894 | /* We pass 0 for the kernel, corefile, and swapfile names | 895 | /* We pass 0 for the kernel, corefile, and swapfile names |
| 895 | to use the currently running kernel. */ | 896 | to use the currently running kernel. */ |
| 896 | kd = kvm_open (0, 0, 0, O_RDONLY, 0); | 897 | kd = kvm_open (0, 0, 0, O_RDONLY, 0); |
| 897 | if (kd != 0) | 898 | if (kd != NULL) |
| 898 | { | 899 | { |
| 899 | /* nlist the currently running kernel. */ | 900 | /* nlist the currently running kernel. */ |
| 900 | kvm_nlist (kd, name_list); | 901 | kvm_nlist (kd, name_list); |
diff --git a/lib/getopt-cdefs.in.h b/lib/getopt-cdefs.in.h index 12b5a877c2f..049145b3869 100644 --- a/lib/getopt-cdefs.in.h +++ b/lib/getopt-cdefs.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getopt-on-non-glibc compatibility macros. | 1 | /* getopt-on-non-glibc compatibility macros. |
| 2 | Copyright (C) 1989-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2019 Free Software Foundation, Inc. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | Unlike most of the getopt implementation, it is NOT shared | 4 | Unlike most of the getopt implementation, it is NOT shared |
| 5 | with the GNU C Library. | 5 | with the GNU C Library. |
diff --git a/lib/getopt-core.h b/lib/getopt-core.h index e51b6c78e72..6360ad6942e 100644 --- a/lib/getopt-core.h +++ b/lib/getopt-core.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Declarations for getopt (basic, portable features only). | 1 | /* Declarations for getopt (basic, portable features only). |
| 2 | Copyright (C) 1989-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
diff --git a/lib/getopt-ext.h b/lib/getopt-ext.h index cb41206ff3a..13cb0077bef 100644 --- a/lib/getopt-ext.h +++ b/lib/getopt-ext.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Declarations for getopt (GNU extensions). | 1 | /* Declarations for getopt (GNU extensions). |
| 2 | Copyright (C) 1989-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h index c62f9e266d0..8fac2691e85 100644 --- a/lib/getopt-pfx-core.h +++ b/lib/getopt-pfx-core.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getopt (basic, portable features) gnulib wrapper header. | 1 | /* getopt (basic, portable features) gnulib wrapper header. |
| 2 | Copyright (C) 1989-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2019 Free Software Foundation, Inc. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | Unlike most of the getopt implementation, it is NOT shared | 4 | Unlike most of the getopt implementation, it is NOT shared |
| 5 | with the GNU C Library. | 5 | with the GNU C Library. |
diff --git a/lib/getopt-pfx-ext.h b/lib/getopt-pfx-ext.h index 753f1290867..0e21aefb0b7 100644 --- a/lib/getopt-pfx-ext.h +++ b/lib/getopt-pfx-ext.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getopt (GNU extensions) gnulib wrapper header. | 1 | /* getopt (GNU extensions) gnulib wrapper header. |
| 2 | Copyright (C) 1989-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2019 Free Software Foundation, Inc. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | Unlike most of the getopt implementation, it is NOT shared | 4 | Unlike most of the getopt implementation, it is NOT shared |
| 5 | with the GNU C Library. | 5 | with the GNU C Library. |
diff --git a/lib/getopt.c b/lib/getopt.c index 11e36eef815..8ee075a8091 100644 --- a/lib/getopt.c +++ b/lib/getopt.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Getopt for GNU. | 1 | /* Getopt for GNU. |
| 2 | Copyright (C) 1987-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1987-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
diff --git a/lib/getopt.in.h b/lib/getopt.in.h index 5fb58ddb0f9..c77f34ce587 100644 --- a/lib/getopt.in.h +++ b/lib/getopt.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Declarations for getopt. | 1 | /* Declarations for getopt. |
| 2 | Copyright (C) 1989-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2019 Free Software Foundation, Inc. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | Unlike most of the getopt implementation, it is NOT shared | 4 | Unlike most of the getopt implementation, it is NOT shared |
| 5 | with the GNU C Library, which supplies a different version of | 5 | with the GNU C Library, which supplies a different version of |
diff --git a/lib/getopt1.c b/lib/getopt1.c index 9c7fff4c73d..883aa6bbc91 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* getopt_long and getopt_long_only entry points for GNU getopt. | 1 | /* getopt_long and getopt_long_only entry points for GNU getopt. |
| 2 | Copyright (C) 1987-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1987-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
diff --git a/lib/getopt_int.h b/lib/getopt_int.h index b0e9a6d0126..e63706f60ea 100644 --- a/lib/getopt_int.h +++ b/lib/getopt_int.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Internal declarations for getopt. | 1 | /* Internal declarations for getopt. |
| 2 | Copyright (C) 1989-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1989-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library and is also part of gnulib. | 3 | This file is part of the GNU C Library and is also part of gnulib. |
| 4 | Patches to this file should be submitted to both projects. | 4 | Patches to this file should be submitted to both projects. |
| 5 | 5 | ||
diff --git a/lib/gettext.h b/lib/gettext.h index f2d7458f4a8..c7c0fdb5311 100644 --- a/lib/gettext.h +++ b/lib/gettext.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convenience header for conditional use of GNU <libintl.h>. | 1 | /* Convenience header for conditional use of GNU <libintl.h>. |
| 2 | Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software | 2 | Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2019 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| @@ -184,9 +184,16 @@ npgettext_aux (const char *domain, | |||
| 184 | 184 | ||
| 185 | #include <string.h> | 185 | #include <string.h> |
| 186 | 186 | ||
| 187 | #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ | 187 | /* GNULIB_NO_VLA can be defined to disable use of VLAs even if supported. |
| 188 | /* || __STDC_VERSION__ == 199901L | 188 | This relates to the -Wvla and -Wvla-larger-than warnings, enabled in |
| 189 | || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ ) | 189 | the default GCC many warnings set. This allows programs to disable use |
| 190 | of VLAs, which may be unintended, or may be awkward to support portably, | ||
| 191 | or may have security implications due to non-deterministic stack usage. */ | ||
| 192 | |||
| 193 | #if (!defined GNULIB_NO_VLA \ | ||
| 194 | && (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ | ||
| 195 | /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc) | ||
| 196 | || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )) | ||
| 190 | # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 | 197 | # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 |
| 191 | #else | 198 | #else |
| 192 | # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 | 199 | # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 |
diff --git a/lib/gettime.c b/lib/gettime.c index bb59c44ff0e..1fd153f6dce 100644 --- a/lib/gettime.c +++ b/lib/gettime.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* gettime -- get the system clock | 1 | /* gettime -- get the system clock |
| 2 | 2 | ||
| 3 | Copyright (C) 2002, 2004-2007, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002, 2004-2007, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index 1bd50fa3d36..e728bf47355 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Provide gettimeofday for systems that don't have it or for which it's broken. | 1 | /* Provide gettimeofday for systems that don't have it or for which it's broken. |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -72,10 +72,10 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz) | |||
| 72 | 72 | ||
| 73 | /* On native Windows, there are two ways to get the current time: | 73 | /* On native Windows, there are two ways to get the current time: |
| 74 | GetSystemTimeAsFileTime | 74 | GetSystemTimeAsFileTime |
| 75 | <https://msdn.microsoft.com/en-us/library/ms724397.aspx> | 75 | <https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime> |
| 76 | or | 76 | or |
| 77 | GetSystemTimePreciseAsFileTime | 77 | GetSystemTimePreciseAsFileTime |
| 78 | <https://msdn.microsoft.com/en-us/library/hh706895.aspx>. | 78 | <https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime>. |
| 79 | GetSystemTimeAsFileTime produces values that jump by increments of | 79 | GetSystemTimeAsFileTime produces values that jump by increments of |
| 80 | 15.627 milliseconds (!) on average. | 80 | 15.627 milliseconds (!) on average. |
| 81 | Whereas GetSystemTimePreciseAsFileTime values usually jump by 1 or 2 | 81 | Whereas GetSystemTimePreciseAsFileTime values usually jump by 1 or 2 |
| @@ -92,7 +92,7 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz) | |||
| 92 | GetSystemTimeAsFileTime (¤t_time); | 92 | GetSystemTimeAsFileTime (¤t_time); |
| 93 | 93 | ||
| 94 | /* Convert from FILETIME to 'struct timeval'. */ | 94 | /* Convert from FILETIME to 'struct timeval'. */ |
| 95 | /* FILETIME: <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */ | 95 | /* FILETIME: <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */ |
| 96 | ULONGLONG since_1601 = | 96 | ULONGLONG since_1601 = |
| 97 | ((ULONGLONG) current_time.dwHighDateTime << 32) | 97 | ((ULONGLONG) current_time.dwHighDateTime << 32) |
| 98 | | (ULONGLONG) current_time.dwLowDateTime; | 98 | | (ULONGLONG) current_time.dwLowDateTime; |
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index aa32dccb3f7..ade4ff8ebdb 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ## DO NOT EDIT! GENERATED AUTOMATICALLY! | 1 | ## DO NOT EDIT! GENERATED AUTOMATICALLY! |
| 2 | # Copyright (C) 2002-2018 Free Software Foundation, Inc. | 2 | # Copyright (C) 2002-2019 Free Software Foundation, Inc. |
| 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 |
| @@ -44,6 +44,7 @@ | |||
| 44 | # --avoid=malloc-posix \ | 44 | # --avoid=malloc-posix \ |
| 45 | # --avoid=mbrtowc \ | 45 | # --avoid=mbrtowc \ |
| 46 | # --avoid=mbsinit \ | 46 | # --avoid=mbsinit \ |
| 47 | # --avoid=memchr \ | ||
| 47 | # --avoid=mkdir \ | 48 | # --avoid=mkdir \ |
| 48 | # --avoid=msvc-inval \ | 49 | # --avoid=msvc-inval \ |
| 49 | # --avoid=msvc-nothrow \ | 50 | # --avoid=msvc-nothrow \ |
| @@ -111,6 +112,7 @@ | |||
| 111 | # largefile \ | 112 | # largefile \ |
| 112 | # lstat \ | 113 | # lstat \ |
| 113 | # manywarnings \ | 114 | # manywarnings \ |
| 115 | # memmem-simple \ | ||
| 114 | # memrchr \ | 116 | # memrchr \ |
| 115 | # minmax \ | 117 | # minmax \ |
| 116 | # mkostemp \ | 118 | # mkostemp \ |
| @@ -176,10 +178,10 @@ BUILD_DETAILS = @BUILD_DETAILS@ | |||
| 176 | BYTESWAP_H = @BYTESWAP_H@ | 178 | BYTESWAP_H = @BYTESWAP_H@ |
| 177 | CAIRO_CFLAGS = @CAIRO_CFLAGS@ | 179 | CAIRO_CFLAGS = @CAIRO_CFLAGS@ |
| 178 | CAIRO_LIBS = @CAIRO_LIBS@ | 180 | CAIRO_LIBS = @CAIRO_LIBS@ |
| 179 | CANNOT_DUMP = @CANNOT_DUMP@ | ||
| 180 | CC = @CC@ | 181 | CC = @CC@ |
| 181 | CFLAGS = @CFLAGS@ | 182 | CFLAGS = @CFLAGS@ |
| 182 | CFLAGS_SOUND = @CFLAGS_SOUND@ | 183 | CFLAGS_SOUND = @CFLAGS_SOUND@ |
| 184 | CHECK_STRUCTS = @CHECK_STRUCTS@ | ||
| 183 | CLIENTRES = @CLIENTRES@ | 185 | CLIENTRES = @CLIENTRES@ |
| 184 | CLIENTW = @CLIENTW@ | 186 | CLIENTW = @CLIENTW@ |
| 185 | CM_OBJ = @CM_OBJ@ | 187 | CM_OBJ = @CM_OBJ@ |
| @@ -197,6 +199,7 @@ DBUS_OBJ = @DBUS_OBJ@ | |||
| 197 | DEFS = @DEFS@ | 199 | DEFS = @DEFS@ |
| 198 | DESLIB = @DESLIB@ | 200 | DESLIB = @DESLIB@ |
| 199 | DOCMISC_W32 = @DOCMISC_W32@ | 201 | DOCMISC_W32 = @DOCMISC_W32@ |
| 202 | DUMPING = @DUMPING@ | ||
| 200 | ECHO_C = @ECHO_C@ | 203 | ECHO_C = @ECHO_C@ |
| 201 | ECHO_N = @ECHO_N@ | 204 | ECHO_N = @ECHO_N@ |
| 202 | ECHO_T = @ECHO_T@ | 205 | ECHO_T = @ECHO_T@ |
| @@ -431,6 +434,7 @@ GNULIB_STRSTR = @GNULIB_STRSTR@ | |||
| 431 | GNULIB_STRTOD = @GNULIB_STRTOD@ | 434 | GNULIB_STRTOD = @GNULIB_STRTOD@ |
| 432 | GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ | 435 | GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ |
| 433 | GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ | 436 | GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ |
| 437 | GNULIB_STRTOLD = @GNULIB_STRTOLD@ | ||
| 434 | GNULIB_STRTOLL = @GNULIB_STRTOLL@ | 438 | GNULIB_STRTOLL = @GNULIB_STRTOLL@ |
| 435 | GNULIB_STRTOULL = @GNULIB_STRTOULL@ | 439 | GNULIB_STRTOULL = @GNULIB_STRTOULL@ |
| 436 | GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ | 440 | GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ |
| @@ -478,6 +482,7 @@ GTK_CFLAGS = @GTK_CFLAGS@ | |||
| 478 | GTK_LIBS = @GTK_LIBS@ | 482 | GTK_LIBS = @GTK_LIBS@ |
| 479 | GTK_OBJ = @GTK_OBJ@ | 483 | GTK_OBJ = @GTK_OBJ@ |
| 480 | GZIP_PROG = @GZIP_PROG@ | 484 | GZIP_PROG = @GZIP_PROG@ |
| 485 | HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ | ||
| 481 | HAVE_ALPHASORT = @HAVE_ALPHASORT@ | 486 | HAVE_ALPHASORT = @HAVE_ALPHASORT@ |
| 482 | HAVE_ATOLL = @HAVE_ATOLL@ | 487 | HAVE_ATOLL = @HAVE_ATOLL@ |
| 483 | HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ | 488 | HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ |
| @@ -556,6 +561,7 @@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ | |||
| 556 | HAVE_GRANTPT = @HAVE_GRANTPT@ | 561 | HAVE_GRANTPT = @HAVE_GRANTPT@ |
| 557 | HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ | 562 | HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ |
| 558 | HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ | 563 | HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ |
| 564 | HAVE_INITSTATE = @HAVE_INITSTATE@ | ||
| 559 | HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ | 565 | HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ |
| 560 | HAVE_LCHMOD = @HAVE_LCHMOD@ | 566 | HAVE_LCHMOD = @HAVE_LCHMOD@ |
| 561 | HAVE_LCHOWN = @HAVE_LCHOWN@ | 567 | HAVE_LCHOWN = @HAVE_LCHOWN@ |
| @@ -566,6 +572,7 @@ HAVE_LSTAT = @HAVE_LSTAT@ | |||
| 566 | HAVE_MAKEINFO = @HAVE_MAKEINFO@ | 572 | HAVE_MAKEINFO = @HAVE_MAKEINFO@ |
| 567 | HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ | 573 | HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ |
| 568 | HAVE_MBSLEN = @HAVE_MBSLEN@ | 574 | HAVE_MBSLEN = @HAVE_MBSLEN@ |
| 575 | HAVE_MBTOWC = @HAVE_MBTOWC@ | ||
| 569 | HAVE_MEMCHR = @HAVE_MEMCHR@ | 576 | HAVE_MEMCHR = @HAVE_MEMCHR@ |
| 570 | HAVE_MEMPCPY = @HAVE_MEMPCPY@ | 577 | HAVE_MEMPCPY = @HAVE_MEMPCPY@ |
| 571 | HAVE_MKDIRAT = @HAVE_MKDIRAT@ | 578 | HAVE_MKDIRAT = @HAVE_MKDIRAT@ |
| @@ -584,6 +591,7 @@ HAVE_OPENAT = @HAVE_OPENAT@ | |||
| 584 | HAVE_OPENDIR = @HAVE_OPENDIR@ | 591 | HAVE_OPENDIR = @HAVE_OPENDIR@ |
| 585 | HAVE_OS_H = @HAVE_OS_H@ | 592 | HAVE_OS_H = @HAVE_OS_H@ |
| 586 | HAVE_PCLOSE = @HAVE_PCLOSE@ | 593 | HAVE_PCLOSE = @HAVE_PCLOSE@ |
| 594 | HAVE_PDUMPER = @HAVE_PDUMPER@ | ||
| 587 | HAVE_PIPE = @HAVE_PIPE@ | 595 | HAVE_PIPE = @HAVE_PIPE@ |
| 588 | HAVE_PIPE2 = @HAVE_PIPE2@ | 596 | HAVE_PIPE2 = @HAVE_PIPE2@ |
| 589 | HAVE_POPEN = @HAVE_POPEN@ | 597 | HAVE_POPEN = @HAVE_POPEN@ |
| @@ -613,6 +621,7 @@ HAVE_SCANDIR = @HAVE_SCANDIR@ | |||
| 613 | HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ | 621 | HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ |
| 614 | HAVE_SETENV = @HAVE_SETENV@ | 622 | HAVE_SETENV = @HAVE_SETENV@ |
| 615 | HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ | 623 | HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ |
| 624 | HAVE_SETSTATE = @HAVE_SETSTATE@ | ||
| 616 | HAVE_SIGACTION = @HAVE_SIGACTION@ | 625 | HAVE_SIGACTION = @HAVE_SIGACTION@ |
| 617 | HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ | 626 | HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ |
| 618 | HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ | 627 | HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ |
| @@ -630,6 +639,7 @@ HAVE_STRPBRK = @HAVE_STRPBRK@ | |||
| 630 | HAVE_STRPTIME = @HAVE_STRPTIME@ | 639 | HAVE_STRPTIME = @HAVE_STRPTIME@ |
| 631 | HAVE_STRSEP = @HAVE_STRSEP@ | 640 | HAVE_STRSEP = @HAVE_STRSEP@ |
| 632 | HAVE_STRTOD = @HAVE_STRTOD@ | 641 | HAVE_STRTOD = @HAVE_STRTOD@ |
| 642 | HAVE_STRTOLD = @HAVE_STRTOLD@ | ||
| 633 | HAVE_STRTOLL = @HAVE_STRTOLL@ | 643 | HAVE_STRTOLL = @HAVE_STRTOLL@ |
| 634 | HAVE_STRTOULL = @HAVE_STRTOULL@ | 644 | HAVE_STRTOULL = @HAVE_STRTOULL@ |
| 635 | HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ | 645 | HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ |
| @@ -859,6 +869,7 @@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ | |||
| 859 | REPLACE_GETPASS = @REPLACE_GETPASS@ | 869 | REPLACE_GETPASS = @REPLACE_GETPASS@ |
| 860 | REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ | 870 | REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ |
| 861 | REPLACE_GMTIME = @REPLACE_GMTIME@ | 871 | REPLACE_GMTIME = @REPLACE_GMTIME@ |
| 872 | REPLACE_INITSTATE = @REPLACE_INITSTATE@ | ||
| 862 | REPLACE_ISATTY = @REPLACE_ISATTY@ | 873 | REPLACE_ISATTY = @REPLACE_ISATTY@ |
| 863 | REPLACE_LCHOWN = @REPLACE_LCHOWN@ | 874 | REPLACE_LCHOWN = @REPLACE_LCHOWN@ |
| 864 | REPLACE_LINK = @REPLACE_LINK@ | 875 | REPLACE_LINK = @REPLACE_LINK@ |
| @@ -894,6 +905,7 @@ REPLACE_PUTENV = @REPLACE_PUTENV@ | |||
| 894 | REPLACE_PWRITE = @REPLACE_PWRITE@ | 905 | REPLACE_PWRITE = @REPLACE_PWRITE@ |
| 895 | REPLACE_QSORT_R = @REPLACE_QSORT_R@ | 906 | REPLACE_QSORT_R = @REPLACE_QSORT_R@ |
| 896 | REPLACE_RAISE = @REPLACE_RAISE@ | 907 | REPLACE_RAISE = @REPLACE_RAISE@ |
| 908 | REPLACE_RANDOM = @REPLACE_RANDOM@ | ||
| 897 | REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ | 909 | REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ |
| 898 | REPLACE_READ = @REPLACE_READ@ | 910 | REPLACE_READ = @REPLACE_READ@ |
| 899 | REPLACE_READLINK = @REPLACE_READLINK@ | 911 | REPLACE_READLINK = @REPLACE_READLINK@ |
| @@ -906,6 +918,7 @@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ | |||
| 906 | REPLACE_RMDIR = @REPLACE_RMDIR@ | 918 | REPLACE_RMDIR = @REPLACE_RMDIR@ |
| 907 | REPLACE_SELECT = @REPLACE_SELECT@ | 919 | REPLACE_SELECT = @REPLACE_SELECT@ |
| 908 | REPLACE_SETENV = @REPLACE_SETENV@ | 920 | REPLACE_SETENV = @REPLACE_SETENV@ |
| 921 | REPLACE_SETSTATE = @REPLACE_SETSTATE@ | ||
| 909 | REPLACE_SLEEP = @REPLACE_SLEEP@ | 922 | REPLACE_SLEEP = @REPLACE_SLEEP@ |
| 910 | REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ | 923 | REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ |
| 911 | REPLACE_SPRINTF = @REPLACE_SPRINTF@ | 924 | REPLACE_SPRINTF = @REPLACE_SPRINTF@ |
| @@ -927,6 +940,7 @@ REPLACE_STRSTR = @REPLACE_STRSTR@ | |||
| 927 | REPLACE_STRTOD = @REPLACE_STRTOD@ | 940 | REPLACE_STRTOD = @REPLACE_STRTOD@ |
| 928 | REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ | 941 | REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ |
| 929 | REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ | 942 | REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ |
| 943 | REPLACE_STRTOLD = @REPLACE_STRTOLD@ | ||
| 930 | REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ | 944 | REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ |
| 931 | REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ | 945 | REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ |
| 932 | REPLACE_SYMLINK = @REPLACE_SYMLINK@ | 946 | REPLACE_SYMLINK = @REPLACE_SYMLINK@ |
| @@ -1009,6 +1023,7 @@ XMKMF = @XMKMF@ | |||
| 1009 | XOBJ = @XOBJ@ | 1023 | XOBJ = @XOBJ@ |
| 1010 | XRANDR_CFLAGS = @XRANDR_CFLAGS@ | 1024 | XRANDR_CFLAGS = @XRANDR_CFLAGS@ |
| 1011 | XRANDR_LIBS = @XRANDR_LIBS@ | 1025 | XRANDR_LIBS = @XRANDR_LIBS@ |
| 1026 | XRENDER_LIBS = @XRENDER_LIBS@ | ||
| 1012 | XWIDGETS_OBJ = @XWIDGETS_OBJ@ | 1027 | XWIDGETS_OBJ = @XWIDGETS_OBJ@ |
| 1013 | X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@ | 1028 | X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@ |
| 1014 | ac_ct_CC = @ac_ct_CC@ | 1029 | ac_ct_CC = @ac_ct_CC@ |
| @@ -1041,7 +1056,6 @@ gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7 = @gl_GNULIB_ENABLED_03e0aaad | |||
| 1041 | gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9 = @gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9@ | 1056 | gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9 = @gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9@ |
| 1042 | gl_GNULIB_ENABLED_21ee726a3540c09237a8e70c0baf7467 = @gl_GNULIB_ENABLED_21ee726a3540c09237a8e70c0baf7467@ | 1057 | gl_GNULIB_ENABLED_21ee726a3540c09237a8e70c0baf7467 = @gl_GNULIB_ENABLED_21ee726a3540c09237a8e70c0baf7467@ |
| 1043 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b = @gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b@ | 1058 | gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b = @gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b@ |
| 1044 | gl_GNULIB_ENABLED_37f71b604aa9c54446783d80f42fe547 = @gl_GNULIB_ENABLED_37f71b604aa9c54446783d80f42fe547@ | ||
| 1045 | gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31 = @gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31@ | 1059 | gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31 = @gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31@ |
| 1046 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c = @gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c@ | 1060 | gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c = @gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c@ |
| 1047 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec = @gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec@ | 1061 | gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec = @gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec@ |
| @@ -1139,7 +1153,7 @@ ifneq (,$(GL_GENERATE_ALLOCA_H)) | |||
| 1139 | alloca.h: alloca.in.h $(top_builddir)/config.status | 1153 | alloca.h: alloca.in.h $(top_builddir)/config.status |
| 1140 | $(AM_V_GEN)rm -f $@-t $@ && \ | 1154 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 1141 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ | 1155 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ |
| 1142 | cat $(srcdir)/alloca.in.h; \ | 1156 | sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' < $(srcdir)/alloca.in.h; \ |
| 1143 | } > $@-t && \ | 1157 | } > $@-t && \ |
| 1144 | mv -f $@-t $@ | 1158 | mv -f $@-t $@ |
| 1145 | else | 1159 | else |
| @@ -1951,6 +1965,17 @@ EXTRA_libgnu_a_SOURCES += lstat.c | |||
| 1951 | endif | 1965 | endif |
| 1952 | ## end gnulib module lstat | 1966 | ## end gnulib module lstat |
| 1953 | 1967 | ||
| 1968 | ## begin gnulib module memmem-simple | ||
| 1969 | ifeq (,$(OMIT_GNULIB_MODULE_memmem-simple)) | ||
| 1970 | |||
| 1971 | |||
| 1972 | EXTRA_DIST += memmem.c str-two-way.h | ||
| 1973 | |||
| 1974 | EXTRA_libgnu_a_SOURCES += memmem.c | ||
| 1975 | |||
| 1976 | endif | ||
| 1977 | ## end gnulib module memmem-simple | ||
| 1978 | |||
| 1954 | ## begin gnulib module memrchr | 1979 | ## begin gnulib module memrchr |
| 1955 | ifeq (,$(OMIT_GNULIB_MODULE_memrchr)) | 1980 | ifeq (,$(OMIT_GNULIB_MODULE_memrchr)) |
| 1956 | 1981 | ||
| @@ -2539,6 +2564,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2539 | -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ | 2564 | -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ |
| 2540 | -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ | 2565 | -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ |
| 2541 | -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ | 2566 | -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ |
| 2567 | -e 's/@''GNULIB_STRTOLD''@/$(GNULIB_STRTOLD)/g' \ | ||
| 2542 | -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ | 2568 | -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ |
| 2543 | -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ | 2569 | -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ |
| 2544 | -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ | 2570 | -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ |
| @@ -2552,7 +2578,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2552 | -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ | 2578 | -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ |
| 2553 | -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ | 2579 | -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ |
| 2554 | -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ | 2580 | -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ |
| 2581 | -e 's|@''HAVE_INITSTATE''@|$(HAVE_INITSTATE)|g' \ | ||
| 2555 | -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ | 2582 | -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ |
| 2583 | -e 's|@''HAVE_MBTOWC''@|$(HAVE_MBTOWC)|g' \ | ||
| 2556 | -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ | 2584 | -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ |
| 2557 | -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ | 2585 | -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ |
| 2558 | -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ | 2586 | -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ |
| @@ -2570,8 +2598,10 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2570 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ | 2598 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ |
| 2571 | -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ | 2599 | -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ |
| 2572 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ | 2600 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ |
| 2601 | -e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \ | ||
| 2573 | -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ | 2602 | -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ |
| 2574 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ | 2603 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ |
| 2604 | -e 's|@''HAVE_STRTOLD''@|$(HAVE_STRTOLD)|g' \ | ||
| 2575 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ | 2605 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ |
| 2576 | -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ | 2606 | -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ |
| 2577 | -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ | 2607 | -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ |
| @@ -2580,6 +2610,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2580 | -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ | 2610 | -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ |
| 2581 | -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ | 2611 | -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ |
| 2582 | -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ | 2612 | -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ |
| 2613 | -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \ | ||
| 2583 | -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ | 2614 | -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ |
| 2584 | -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ | 2615 | -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ |
| 2585 | -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ | 2616 | -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ |
| @@ -2587,11 +2618,14 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2587 | -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ | 2618 | -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ |
| 2588 | -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ | 2619 | -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ |
| 2589 | -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ | 2620 | -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ |
| 2621 | -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \ | ||
| 2590 | -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ | 2622 | -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ |
| 2591 | -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ | 2623 | -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ |
| 2592 | -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ | 2624 | -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ |
| 2593 | -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ | 2625 | -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ |
| 2626 | -e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \ | ||
| 2594 | -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ | 2627 | -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ |
| 2628 | -e 's|@''REPLACE_STRTOLD''@|$(REPLACE_STRTOLD)|g' \ | ||
| 2595 | -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ | 2629 | -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ |
| 2596 | -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ | 2630 | -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ |
| 2597 | -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ | 2631 | -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ |
diff --git a/lib/group-member.c b/lib/group-member.c index 3747dfe785b..ad61cf0b630 100644 --- a/lib/group-member.c +++ b/lib/group-member.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* group-member.c -- determine whether group id is in calling user's group list | 1 | /* group-member.c -- determine whether group id is in calling user's group list |
| 2 | 2 | ||
| 3 | Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2018 Free Software | 3 | Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/ieee754.in.h b/lib/ieee754.in.h index 316ac039afe..a079e59d791 100644 --- a/lib/ieee754.in.h +++ b/lib/ieee754.in.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1992-2018 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1992-2019 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/lib/ignore-value.h b/lib/ignore-value.h index 95eac1cae72..7e3b4c1f0f7 100644 --- a/lib/ignore-value.h +++ b/lib/ignore-value.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* ignore a function return without a compiler warning. -*- coding: utf-8 -*- | 1 | /* ignore a function return without a compiler warning. -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2008-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2008-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/intprops.h b/lib/intprops.h index cdaf6586cb6..1a44ae55653 100644 --- a/lib/intprops.h +++ b/lib/intprops.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* intprops.h -- properties of integer types | 1 | /* intprops.h -- properties of integer types |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2001-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify it | 5 | This program is free software: you can redistribute it and/or modify it |
| 6 | under the terms of the GNU General Public License as published | 6 | under the terms of the GNU General Public License as published |
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index c7d7968e6e9..d3c735c12ce 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 2006-2018 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2006-2019 Free Software Foundation, Inc. |
| 2 | Written by Paul Eggert, Bruno Haible, Derek Price. | 2 | Written by Paul Eggert, Bruno Haible, Derek Price. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | 4 | ||
diff --git a/lib/libc-config.h b/lib/libc-config.h index d7b40935cd4..57c69661d2f 100644 --- a/lib/libc-config.h +++ b/lib/libc-config.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* System definitions for code taken from the GNU C Library | 1 | /* System definitions for code taken from the GNU C Library |
| 2 | 2 | ||
| 3 | Copyright 2017-2018 Free Software Foundation, Inc. | 3 | Copyright 2017-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or | 5 | This program is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU General Public |
diff --git a/lib/limits.in.h b/lib/limits.in.h index 89d7195488a..39750b38d1a 100644 --- a/lib/limits.in.h +++ b/lib/limits.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <limits.h>. | 1 | /* A GNU-like <limits.h>. |
| 2 | 2 | ||
| 3 | Copyright 2016-2018 Free Software Foundation, Inc. | 3 | Copyright 2016-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or | 5 | This program is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public License | 6 | modify it under the terms of the GNU General Public License |
diff --git a/lib/localtime-buffer.c b/lib/localtime-buffer.c index df11f4321db..b65ea45af20 100644 --- a/lib/localtime-buffer.c +++ b/lib/localtime-buffer.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Provide access to the last buffer returned by localtime() or gmtime(). | 1 | /* Provide access to the last buffer returned by localtime() or gmtime(). |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -34,6 +34,7 @@ struct tm *localtime_buffer_addr = &tm_zero_buffer; | |||
| 34 | 34 | ||
| 35 | struct tm * | 35 | struct tm * |
| 36 | rpl_localtime (time_t const *timep) | 36 | rpl_localtime (time_t const *timep) |
| 37 | #undef localtime | ||
| 37 | { | 38 | { |
| 38 | struct tm *tm = localtime (timep); | 39 | struct tm *tm = localtime (timep); |
| 39 | 40 | ||
| @@ -46,6 +47,7 @@ rpl_localtime (time_t const *timep) | |||
| 46 | /* Same as above, since gmtime and localtime use the same buffer. */ | 47 | /* Same as above, since gmtime and localtime use the same buffer. */ |
| 47 | struct tm * | 48 | struct tm * |
| 48 | rpl_gmtime (time_t const *timep) | 49 | rpl_gmtime (time_t const *timep) |
| 50 | #undef gmtime | ||
| 49 | { | 51 | { |
| 50 | struct tm *tm = gmtime (timep); | 52 | struct tm *tm = gmtime (timep); |
| 51 | 53 | ||
diff --git a/lib/localtime-buffer.h b/lib/localtime-buffer.h index f381ff0e6de..031111a752f 100644 --- a/lib/localtime-buffer.h +++ b/lib/localtime-buffer.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Provide access to the last buffer returned by localtime() or gmtime(). | 1 | /* Provide access to the last buffer returned by localtime() or gmtime(). |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/lstat.c b/lib/lstat.c index 5873bbd67c9..a3e40d826f0 100644 --- a/lib/lstat.c +++ b/lib/lstat.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Work around a bug of lstat on some systems | 1 | /* Work around a bug of lstat on some systems |
| 2 | 2 | ||
| 3 | Copyright (C) 1997-2006, 2008-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1997-2006, 2008-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -42,10 +42,14 @@ orig_lstat (const char *filename, struct stat *buf) | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | /* Specification. */ | 44 | /* Specification. */ |
| 45 | # ifdef __osf__ | ||
| 45 | /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc | 46 | /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc |
| 46 | eliminates this include because of the preliminary #include <sys/stat.h> | 47 | eliminates this include because of the preliminary #include <sys/stat.h> |
| 47 | above. */ | 48 | above. */ |
| 48 | # include "sys/stat.h" | 49 | # include "sys/stat.h" |
| 50 | # else | ||
| 51 | # include <sys/stat.h> | ||
| 52 | # endif | ||
| 49 | 53 | ||
| 50 | # include "stat-time.h" | 54 | # include "stat-time.h" |
| 51 | 55 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Functions to compute MD5 message digest of files or memory blocks. | 1 | /* Functions to compute MD5 message digest of files or memory blocks. |
| 2 | according to the definition of MD5 in RFC 1321 from April 1992. | 2 | according to the definition of MD5 in RFC 1321 from April 1992. |
| 3 | Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2018 Free Software | 3 | Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | This file is part of the GNU C Library. | 5 | This file is part of the GNU C Library. |
| 6 | 6 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Declaration of functions and data types used for MD5 sum computing | 1 | /* Declaration of functions and data types used for MD5 sum computing |
| 2 | library functions. | 2 | library functions. |
| 3 | Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2018 Free Software | 3 | Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | This file is part of the GNU C Library. | 5 | This file is part of the GNU C Library. |
| 6 | 6 | ||
diff --git a/lib/memmem.c b/lib/memmem.c new file mode 100644 index 00000000000..12ae24f41b4 --- /dev/null +++ b/lib/memmem.c | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | /* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2019 Free Software | ||
| 2 | Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 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 | ||
| 7 | the Free Software Foundation; either version 3, or (at your option) | ||
| 8 | any later version. | ||
| 9 | |||
| 10 | This program is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License along | ||
| 16 | with this program; if not, see <https://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | /* This particular implementation was written by Eric Blake, 2008. */ | ||
| 19 | |||
| 20 | #ifndef _LIBC | ||
| 21 | # include <config.h> | ||
| 22 | #endif | ||
| 23 | |||
| 24 | /* Specification of memmem. */ | ||
| 25 | #include <string.h> | ||
| 26 | |||
| 27 | #define RETURN_TYPE void * | ||
| 28 | #define AVAILABLE(h, h_l, j, n_l) ((j) <= (h_l) - (n_l)) | ||
| 29 | #include "str-two-way.h" | ||
| 30 | |||
| 31 | /* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK | ||
| 32 | if NEEDLE_LEN is 0, otherwise NULL if NEEDLE is not found in | ||
| 33 | HAYSTACK. */ | ||
| 34 | void * | ||
| 35 | memmem (const void *haystack_start, size_t haystack_len, | ||
| 36 | const void *needle_start, size_t needle_len) | ||
| 37 | { | ||
| 38 | /* Abstract memory is considered to be an array of 'unsigned char' values, | ||
| 39 | not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ | ||
| 40 | const unsigned char *haystack = (const unsigned char *) haystack_start; | ||
| 41 | const unsigned char *needle = (const unsigned char *) needle_start; | ||
| 42 | |||
| 43 | if (needle_len == 0) | ||
| 44 | /* The first occurrence of the empty string is deemed to occur at | ||
| 45 | the beginning of the string. */ | ||
| 46 | return (void *) haystack; | ||
| 47 | |||
| 48 | /* Sanity check, otherwise the loop might search through the whole | ||
| 49 | memory. */ | ||
| 50 | if (__builtin_expect (haystack_len < needle_len, 0)) | ||
| 51 | return NULL; | ||
| 52 | |||
| 53 | /* Use optimizations in memchr when possible, to reduce the search | ||
| 54 | size of haystack using a linear algorithm with a smaller | ||
| 55 | coefficient. However, avoid memchr for long needles, since we | ||
| 56 | can often achieve sublinear performance. */ | ||
| 57 | if (needle_len < LONG_NEEDLE_THRESHOLD) | ||
| 58 | { | ||
| 59 | haystack = memchr (haystack, *needle, haystack_len); | ||
| 60 | if (!haystack || __builtin_expect (needle_len == 1, 0)) | ||
| 61 | return (void *) haystack; | ||
| 62 | haystack_len -= haystack - (const unsigned char *) haystack_start; | ||
| 63 | if (haystack_len < needle_len) | ||
| 64 | return NULL; | ||
| 65 | return two_way_short_needle (haystack, haystack_len, needle, needle_len); | ||
| 66 | } | ||
| 67 | else | ||
| 68 | return two_way_long_needle (haystack, haystack_len, needle, needle_len); | ||
| 69 | } | ||
| 70 | |||
| 71 | #undef LONG_NEEDLE_THRESHOLD | ||
diff --git a/lib/memrchr.c b/lib/memrchr.c index 2efc7cb9752..96022835cef 100644 --- a/lib/memrchr.c +++ b/lib/memrchr.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* memrchr -- find the last occurrence of a byte in a memory block | 1 | /* memrchr -- find the last occurrence of a byte in a memory block |
| 2 | 2 | ||
| 3 | Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2018 Free Software | 3 | Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | Based on strlen implementation by Torbjorn Granlund (tege@sics.se), | 6 | Based on strlen implementation by Torbjorn Granlund (tege@sics.se), |
diff --git a/lib/minmax.h b/lib/minmax.h index 33a5305f429..d7f6bea0619 100644 --- a/lib/minmax.h +++ b/lib/minmax.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* MIN, MAX macros. | 1 | /* MIN, MAX macros. |
| 2 | Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2018 Free Software | 2 | Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2019 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
diff --git a/lib/mkostemp.c b/lib/mkostemp.c index df9ecf8c4ef..bbfe9dbc08f 100644 --- a/lib/mkostemp.c +++ b/lib/mkostemp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2018 Free Software | 1 | /* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2019 Free Software |
| 2 | Foundation, Inc. | 2 | Foundation, Inc. |
| 3 | This file is derived from the one in the GNU C Library. | 3 | This file is derived from the one in the GNU C Library. |
| 4 | 4 | ||
diff --git a/lib/mktime-internal.h b/lib/mktime-internal.h index 31cf3a4dab2..d13d89cfae7 100644 --- a/lib/mktime-internal.h +++ b/lib/mktime-internal.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* mktime variant that also uses an offset guess | 1 | /* mktime variant that also uses an offset guess |
| 2 | 2 | ||
| 3 | Copyright 2016-2018 Free Software Foundation, Inc. | 3 | Copyright 2016-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or | 5 | This program is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU General Public |
diff --git a/lib/mktime.c b/lib/mktime.c index 9c3fb20f79d..e3783d7a95e 100644 --- a/lib/mktime.c +++ b/lib/mktime.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Convert a 'struct tm' to a time_t value. | 1 | /* Convert a 'struct tm' to a time_t value. |
| 2 | Copyright (C) 1993-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 1993-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Paul Eggert <eggert@twinsun.com>. | 4 | Contributed by Paul Eggert <eggert@twinsun.com>. |
| 5 | 5 | ||
| @@ -72,7 +72,7 @@ my_tzset (void) | |||
| 72 | /* Rectify the value of the environment variable TZ. | 72 | /* Rectify the value of the environment variable TZ. |
| 73 | There are four possible kinds of such values: | 73 | There are four possible kinds of such values: |
| 74 | - Traditional US time zone names, e.g. "PST8PDT". Syntax: see | 74 | - Traditional US time zone names, e.g. "PST8PDT". Syntax: see |
| 75 | <https://msdn.microsoft.com/en-us/library/90s5c885.aspx> | 75 | <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset> |
| 76 | - Time zone names based on geography, that contain one or more | 76 | - Time zone names based on geography, that contain one or more |
| 77 | slashes, e.g. "Europe/Moscow". | 77 | slashes, e.g. "Europe/Moscow". |
| 78 | - Time zone names based on geography, without slashes, e.g. | 78 | - Time zone names based on geography, without slashes, e.g. |
diff --git a/lib/nstrftime.c b/lib/nstrftime.c index 1dd49c0f782..bc84da5a0cb 100644 --- a/lib/nstrftime.c +++ b/lib/nstrftime.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1991-2018 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1991-2019 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. | 2 | This file is part of the GNU C Library. |
| 3 | 3 | ||
| 4 | The GNU C Library is free software; you can redistribute it and/or | 4 | The GNU C Library is free software; you can redistribute it and/or |
| @@ -180,7 +180,7 @@ extern char *tzname[]; | |||
| 180 | if (digits == 0 && _n < _w) \ | 180 | if (digits == 0 && _n < _w) \ |
| 181 | { \ | 181 | { \ |
| 182 | size_t _delta = width - _n; \ | 182 | size_t _delta = width - _n; \ |
| 183 | if (pad == L_('0')) \ | 183 | if (pad == L_('0') || pad == L_('+')) \ |
| 184 | memset_zero (p, _delta); \ | 184 | memset_zero (p, _delta); \ |
| 185 | else \ | 185 | else \ |
| 186 | memset_space (p, _delta); \ | 186 | memset_space (p, _delta); \ |
| @@ -418,7 +418,7 @@ iso_week_days (int yday, int wday) | |||
| 418 | 418 | ||
| 419 | static size_t __strftime_internal (STREAM_OR_CHAR_T *, STRFTIME_ARG (size_t) | 419 | static size_t __strftime_internal (STREAM_OR_CHAR_T *, STRFTIME_ARG (size_t) |
| 420 | const CHAR_T *, const struct tm *, | 420 | const CHAR_T *, const struct tm *, |
| 421 | bool, bool * | 421 | bool, int, int, bool * |
| 422 | extra_args_spec LOCALE_PARAM); | 422 | extra_args_spec LOCALE_PARAM); |
| 423 | 423 | ||
| 424 | /* Write information from TP into S according to the format | 424 | /* Write information from TP into S according to the format |
| @@ -433,8 +433,8 @@ my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 433 | const struct tm *tp extra_args_spec LOCALE_PARAM) | 433 | const struct tm *tp extra_args_spec LOCALE_PARAM) |
| 434 | { | 434 | { |
| 435 | bool tzset_called = false; | 435 | bool tzset_called = false; |
| 436 | return __strftime_internal (s, STRFTIME_ARG (maxsize) format, tp, | 436 | return __strftime_internal (s, STRFTIME_ARG (maxsize) format, tp, false, |
| 437 | false, &tzset_called extra_args LOCALE_ARG); | 437 | 0, -1, &tzset_called extra_args LOCALE_ARG); |
| 438 | } | 438 | } |
| 439 | #if defined _LIBC && ! FPRINTFTIME | 439 | #if defined _LIBC && ! FPRINTFTIME |
| 440 | libc_hidden_def (my_strftime) | 440 | libc_hidden_def (my_strftime) |
| @@ -446,7 +446,8 @@ libc_hidden_def (my_strftime) | |||
| 446 | static size_t | 446 | static size_t |
| 447 | __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | 447 | __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) |
| 448 | const CHAR_T *format, | 448 | const CHAR_T *format, |
| 449 | const struct tm *tp, bool upcase, bool *tzset_called | 449 | const struct tm *tp, bool upcase, |
| 450 | int yr_spec, int width, bool *tzset_called | ||
| 450 | extra_args_spec LOCALE_PARAM) | 451 | extra_args_spec LOCALE_PARAM) |
| 451 | { | 452 | { |
| 452 | #if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL | 453 | #if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL |
| @@ -558,7 +559,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 558 | if (hour12 == 0) | 559 | if (hour12 == 0) |
| 559 | hour12 = 12; | 560 | hour12 = 12; |
| 560 | 561 | ||
| 561 | for (f = format; *f != '\0'; ++f) | 562 | for (f = format; *f != '\0'; width = -1, f++) |
| 562 | { | 563 | { |
| 563 | int pad = 0; /* Padding for number ('-', '_', or 0). */ | 564 | int pad = 0; /* Padding for number ('-', '_', or 0). */ |
| 564 | int modifier; /* Field modifier ('E', 'O', or 0). */ | 565 | int modifier; /* Field modifier ('E', 'O', or 0). */ |
| @@ -576,12 +577,12 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 576 | + (sizeof (int) < sizeof (time_t) | 577 | + (sizeof (int) < sizeof (time_t) |
| 577 | ? INT_STRLEN_BOUND (time_t) | 578 | ? INT_STRLEN_BOUND (time_t) |
| 578 | : INT_STRLEN_BOUND (int))]; | 579 | : INT_STRLEN_BOUND (int))]; |
| 579 | int width = -1; | ||
| 580 | bool to_lowcase = false; | 580 | bool to_lowcase = false; |
| 581 | bool to_uppcase = upcase; | 581 | bool to_uppcase = upcase; |
| 582 | size_t colons; | 582 | size_t colons; |
| 583 | bool change_case = false; | 583 | bool change_case = false; |
| 584 | int format_char; | 584 | int format_char; |
| 585 | int subwidth; | ||
| 585 | 586 | ||
| 586 | #if DO_MULTIBYTE && !defined COMPILE_WIDE | 587 | #if DO_MULTIBYTE && !defined COMPILE_WIDE |
| 587 | switch (*f) | 588 | switch (*f) |
| @@ -679,6 +680,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 679 | /* This influences the number formats. */ | 680 | /* This influences the number formats. */ |
| 680 | case L_('_'): | 681 | case L_('_'): |
| 681 | case L_('-'): | 682 | case L_('-'): |
| 683 | case L_('+'): | ||
| 682 | case L_('0'): | 684 | case L_('0'): |
| 683 | pad = *f; | 685 | pad = *f; |
| 684 | continue; | 686 | continue; |
| @@ -697,7 +699,6 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 697 | break; | 699 | break; |
| 698 | } | 700 | } |
| 699 | 701 | ||
| 700 | /* As a GNU extension we allow the field width to be specified. */ | ||
| 701 | if (ISDIGIT (*f)) | 702 | if (ISDIGIT (*f)) |
| 702 | { | 703 | { |
| 703 | width = 0; | 704 | width = 0; |
| @@ -743,12 +744,16 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 743 | } \ | 744 | } \ |
| 744 | while (0) | 745 | while (0) |
| 745 | #define DO_SIGNED_NUMBER(d, negative, v) \ | 746 | #define DO_SIGNED_NUMBER(d, negative, v) \ |
| 747 | DO_MAYBE_SIGNED_NUMBER (d, negative, v, do_signed_number) | ||
| 748 | #define DO_YEARISH(d, negative, v) \ | ||
| 749 | DO_MAYBE_SIGNED_NUMBER (d, negative, v, do_yearish) | ||
| 750 | #define DO_MAYBE_SIGNED_NUMBER(d, negative, v, label) \ | ||
| 746 | do \ | 751 | do \ |
| 747 | { \ | 752 | { \ |
| 748 | digits = d; \ | 753 | digits = d; \ |
| 749 | negative_number = negative; \ | 754 | negative_number = negative; \ |
| 750 | u_number_value = v; \ | 755 | u_number_value = v; \ |
| 751 | goto do_signed_number; \ | 756 | goto label; \ |
| 752 | } \ | 757 | } \ |
| 753 | while (0) | 758 | while (0) |
| 754 | 759 | ||
| @@ -850,7 +855,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 850 | if (modifier == L_('O')) | 855 | if (modifier == L_('O')) |
| 851 | goto bad_format; | 856 | goto bad_format; |
| 852 | #ifdef _NL_CURRENT | 857 | #ifdef _NL_CURRENT |
| 853 | if (! (modifier == 'E' | 858 | if (! (modifier == L_('E') |
| 854 | && (*(subfmt = | 859 | && (*(subfmt = |
| 855 | (const CHAR_T *) _NL_CURRENT (LC_TIME, | 860 | (const CHAR_T *) _NL_CURRENT (LC_TIME, |
| 856 | NLW(ERA_D_T_FMT))) | 861 | NLW(ERA_D_T_FMT))) |
| @@ -861,15 +866,17 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 861 | #endif | 866 | #endif |
| 862 | 867 | ||
| 863 | subformat: | 868 | subformat: |
| 869 | subwidth = -1; | ||
| 870 | subformat_width: | ||
| 864 | { | 871 | { |
| 865 | size_t len = __strftime_internal (NULL, STRFTIME_ARG ((size_t) -1) | 872 | size_t len = __strftime_internal (NULL, STRFTIME_ARG ((size_t) -1) |
| 866 | subfmt, | 873 | subfmt, tp, to_uppcase, |
| 867 | tp, to_uppcase, tzset_called | 874 | pad, subwidth, tzset_called |
| 868 | extra_args LOCALE_ARG); | 875 | extra_args LOCALE_ARG); |
| 869 | add (len, __strftime_internal (p, | 876 | add (len, __strftime_internal (p, |
| 870 | STRFTIME_ARG (maxsize - i) | 877 | STRFTIME_ARG (maxsize - i) |
| 871 | subfmt, | 878 | subfmt, tp, to_uppcase, |
| 872 | tp, to_uppcase, tzset_called | 879 | pad, subwidth, tzset_called |
| 873 | extra_args LOCALE_ARG)); | 880 | extra_args LOCALE_ARG)); |
| 874 | } | 881 | } |
| 875 | break; | 882 | break; |
| @@ -930,7 +937,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 930 | { | 937 | { |
| 931 | int century = tp->tm_year / 100 + TM_YEAR_BASE / 100; | 938 | int century = tp->tm_year / 100 + TM_YEAR_BASE / 100; |
| 932 | century -= tp->tm_year % 100 < 0 && 0 < century; | 939 | century -= tp->tm_year % 100 < 0 && 0 < century; |
| 933 | DO_SIGNED_NUMBER (2, tp->tm_year < - TM_YEAR_BASE, century); | 940 | DO_YEARISH (2, tp->tm_year < - TM_YEAR_BASE, century); |
| 934 | } | 941 | } |
| 935 | 942 | ||
| 936 | case L_('x'): | 943 | case L_('x'): |
| @@ -939,7 +946,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 939 | #ifdef _NL_CURRENT | 946 | #ifdef _NL_CURRENT |
| 940 | if (! (modifier == L_('E') | 947 | if (! (modifier == L_('E') |
| 941 | && (*(subfmt = | 948 | && (*(subfmt = |
| 942 | (const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT))) | 949 | (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_D_FMT))) |
| 943 | != L_('\0')))) | 950 | != L_('\0')))) |
| 944 | subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT)); | 951 | subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT)); |
| 945 | goto subformat; | 952 | goto subformat; |
| @@ -971,9 +978,17 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 971 | always_output_a_sign = true; | 978 | always_output_a_sign = true; |
| 972 | goto do_number_body; | 979 | goto do_number_body; |
| 973 | 980 | ||
| 981 | do_yearish: | ||
| 982 | if (pad == 0) | ||
| 983 | pad = yr_spec; | ||
| 984 | always_output_a_sign | ||
| 985 | = (pad == L_('+') | ||
| 986 | && ((digits == 2 ? 99 : 9999) < u_number_value | ||
| 987 | || digits < width)); | ||
| 988 | goto do_maybe_signed_number; | ||
| 989 | |||
| 974 | do_number_spacepad: | 990 | do_number_spacepad: |
| 975 | /* Force '_' flag unless overridden by '0' or '-' flag. */ | 991 | if (pad == 0) |
| 976 | if (pad != L_('0') && pad != L_('-')) | ||
| 977 | pad = L_('_'); | 992 | pad = L_('_'); |
| 978 | 993 | ||
| 979 | do_number: | 994 | do_number: |
| @@ -983,6 +998,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 983 | 998 | ||
| 984 | do_signed_number: | 999 | do_signed_number: |
| 985 | always_output_a_sign = false; | 1000 | always_output_a_sign = false; |
| 1001 | |||
| 1002 | do_maybe_signed_number: | ||
| 986 | tz_colon_mask = 0; | 1003 | tz_colon_mask = 0; |
| 987 | 1004 | ||
| 988 | do_number_body: | 1005 | do_number_body: |
| @@ -1087,8 +1104,19 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1087 | case L_('F'): | 1104 | case L_('F'): |
| 1088 | if (modifier != 0) | 1105 | if (modifier != 0) |
| 1089 | goto bad_format; | 1106 | goto bad_format; |
| 1107 | if (pad == 0 && width < 0) | ||
| 1108 | { | ||
| 1109 | pad = L_('+'); | ||
| 1110 | subwidth = 4; | ||
| 1111 | } | ||
| 1112 | else | ||
| 1113 | { | ||
| 1114 | subwidth = width - 6; | ||
| 1115 | if (subwidth < 0) | ||
| 1116 | subwidth = 0; | ||
| 1117 | } | ||
| 1090 | subfmt = L_("%Y-%m-%d"); | 1118 | subfmt = L_("%Y-%m-%d"); |
| 1091 | goto subformat; | 1119 | goto subformat_width; |
| 1092 | 1120 | ||
| 1093 | case L_('H'): | 1121 | case L_('H'): |
| 1094 | if (modifier == L_('E')) | 1122 | if (modifier == L_('E')) |
| @@ -1297,17 +1325,18 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1297 | case L_('g'): | 1325 | case L_('g'): |
| 1298 | { | 1326 | { |
| 1299 | int yy = (tp->tm_year % 100 + year_adjust) % 100; | 1327 | int yy = (tp->tm_year % 100 + year_adjust) % 100; |
| 1300 | DO_NUMBER (2, (0 <= yy | 1328 | DO_YEARISH (2, false, |
| 1301 | ? yy | 1329 | (0 <= yy |
| 1302 | : tp->tm_year < -TM_YEAR_BASE - year_adjust | 1330 | ? yy |
| 1303 | ? -yy | 1331 | : tp->tm_year < -TM_YEAR_BASE - year_adjust |
| 1304 | : yy + 100)); | 1332 | ? -yy |
| 1333 | : yy + 100)); | ||
| 1305 | } | 1334 | } |
| 1306 | 1335 | ||
| 1307 | case L_('G'): | 1336 | case L_('G'): |
| 1308 | DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE - year_adjust, | 1337 | DO_YEARISH (4, tp->tm_year < -TM_YEAR_BASE - year_adjust, |
| 1309 | (tp->tm_year + (unsigned int) TM_YEAR_BASE | 1338 | (tp->tm_year + (unsigned int) TM_YEAR_BASE |
| 1310 | + year_adjust)); | 1339 | + year_adjust)); |
| 1311 | 1340 | ||
| 1312 | default: | 1341 | default: |
| 1313 | DO_NUMBER (2, days / 7 + 1); | 1342 | DO_NUMBER (2, days / 7 + 1); |
| @@ -1327,7 +1356,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1327 | DO_NUMBER (1, tp->tm_wday); | 1356 | DO_NUMBER (1, tp->tm_wday); |
| 1328 | 1357 | ||
| 1329 | case L_('Y'): | 1358 | case L_('Y'): |
| 1330 | if (modifier == 'E') | 1359 | if (modifier == L_('E')) |
| 1331 | { | 1360 | { |
| 1332 | #if HAVE_STRUCT_ERA_ENTRY | 1361 | #if HAVE_STRUCT_ERA_ENTRY |
| 1333 | struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); | 1362 | struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); |
| @@ -1338,6 +1367,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1338 | # else | 1367 | # else |
| 1339 | subfmt = era->era_format; | 1368 | subfmt = era->era_format; |
| 1340 | # endif | 1369 | # endif |
| 1370 | if (pad == 0) | ||
| 1371 | pad = yr_spec; | ||
| 1341 | goto subformat; | 1372 | goto subformat; |
| 1342 | } | 1373 | } |
| 1343 | #else | 1374 | #else |
| @@ -1347,8 +1378,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1347 | if (modifier == L_('O')) | 1378 | if (modifier == L_('O')) |
| 1348 | goto bad_format; | 1379 | goto bad_format; |
| 1349 | 1380 | ||
| 1350 | DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE, | 1381 | DO_YEARISH (4, tp->tm_year < -TM_YEAR_BASE, |
| 1351 | tp->tm_year + (unsigned int) TM_YEAR_BASE); | 1382 | tp->tm_year + (unsigned int) TM_YEAR_BASE); |
| 1352 | 1383 | ||
| 1353 | case L_('y'): | 1384 | case L_('y'): |
| 1354 | if (modifier == L_('E')) | 1385 | if (modifier == L_('E')) |
| @@ -1358,7 +1389,9 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1358 | if (era) | 1389 | if (era) |
| 1359 | { | 1390 | { |
| 1360 | int delta = tp->tm_year - era->start_date[0]; | 1391 | int delta = tp->tm_year - era->start_date[0]; |
| 1361 | DO_NUMBER (1, (era->offset | 1392 | if (pad == 0) |
| 1393 | pad = yr_spec; | ||
| 1394 | DO_NUMBER (2, (era->offset | ||
| 1362 | + delta * era->absolute_direction)); | 1395 | + delta * era->absolute_direction)); |
| 1363 | } | 1396 | } |
| 1364 | #else | 1397 | #else |
| @@ -1370,7 +1403,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1370 | int yy = tp->tm_year % 100; | 1403 | int yy = tp->tm_year % 100; |
| 1371 | if (yy < 0) | 1404 | if (yy < 0) |
| 1372 | yy = tp->tm_year < - TM_YEAR_BASE ? -yy : yy + 100; | 1405 | yy = tp->tm_year < - TM_YEAR_BASE ? -yy : yy + 100; |
| 1373 | DO_NUMBER (2, yy); | 1406 | DO_YEARISH (2, false, yy); |
| 1374 | } | 1407 | } |
| 1375 | 1408 | ||
| 1376 | case L_('Z'): | 1409 | case L_('Z'): |
diff --git a/lib/open.c b/lib/open.c index 792e258ba0b..655260572d4 100644 --- a/lib/open.c +++ b/lib/open.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Open a descriptor to a file. | 1 | /* Open a descriptor to a file. |
| 2 | Copyright (C) 2007-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/openat-priv.h b/lib/openat-priv.h index 5d53df12018..7b90eefa488 100644 --- a/lib/openat-priv.h +++ b/lib/openat-priv.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Internals for openat-like functions. | 1 | /* Internals for openat-like functions. |
| 2 | 2 | ||
| 3 | Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/openat-proc.c b/lib/openat-proc.c index 87137eec538..da76e2b393e 100644 --- a/lib/openat-proc.c +++ b/lib/openat-proc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Create /proc/self/fd-related names for subfiles of open directories. | 1 | /* Create /proc/self/fd-related names for subfiles of open directories. |
| 2 | 2 | ||
| 3 | Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/openat.h b/lib/openat.h index 945e032836b..f23b371c437 100644 --- a/lib/openat.h +++ b/lib/openat.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* provide a replacement openat function | 1 | /* provide a replacement openat function |
| 2 | Copyright (C) 2004-2006, 2008-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2004-2006, 2008-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/pipe2.c b/lib/pipe2.c index c16d9351ec8..15a5dec9852 100644 --- a/lib/pipe2.c +++ b/lib/pipe2.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Create a pipe, with specific opening flags. | 1 | /* Create a pipe, with specific opening flags. |
| 2 | Copyright (C) 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/pselect.c b/lib/pselect.c index 33b2719561f..ae010aa02e4 100644 --- a/lib/pselect.c +++ b/lib/pselect.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* pselect - synchronous I/O multiplexing | 1 | /* pselect - synchronous I/O multiplexing |
| 2 | 2 | ||
| 3 | Copyright 2011-2018 Free Software Foundation, Inc. | 3 | Copyright 2011-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of gnulib. | 5 | This file is part of gnulib. |
| 6 | 6 | ||
diff --git a/lib/pthread_sigmask.c b/lib/pthread_sigmask.c index 3bb92ca8ef7..3e40cfcd393 100644 --- a/lib/pthread_sigmask.c +++ b/lib/pthread_sigmask.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* POSIX compatible signal blocking for threads. | 1 | /* POSIX compatible signal blocking for threads. |
| 2 | Copyright (C) 2011-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2011-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/putenv.c b/lib/putenv.c index 801e372c329..81085e9d80a 100644 --- a/lib/putenv.c +++ b/lib/putenv.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2018 Free Software | 1 | /* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2019 Free Software |
| 2 | Foundation, Inc. | 2 | Foundation, Inc. |
| 3 | 3 | ||
| 4 | NOTE: The canonical source of this file is maintained with the GNU C | 4 | NOTE: The canonical source of this file is maintained with the GNU C |
diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c index ee482ef4552..cf7508016f9 100644 --- a/lib/qcopy-acl.c +++ b/lib/qcopy-acl.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Copy access control list from one file to another. -*- coding: utf-8 -*- | 1 | /* Copy access control list from one file to another. -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2002-2003, 2005-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002-2003, 2005-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/readlink.c b/lib/readlink.c index 924e00d234a..bf711093502 100644 --- a/lib/readlink.c +++ b/lib/readlink.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Stub for readlink(). | 1 | /* Stub for readlink(). |
| 2 | Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/readlinkat.c b/lib/readlinkat.c index 35179e2a380..c0f3e59f6ce 100644 --- a/lib/readlinkat.c +++ b/lib/readlinkat.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Read a symlink relative to an open directory. | 1 | /* Read a symlink relative to an open directory. |
| 2 | Copyright (C) 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/regcomp.c b/lib/regcomp.c index 0b05a63b632..892139a02af 100644 --- a/lib/regcomp.c +++ b/lib/regcomp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
| @@ -233,9 +233,7 @@ re_compile_pattern (const char *pattern, size_t length, | |||
| 233 | return NULL; | 233 | return NULL; |
| 234 | return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); | 234 | return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); |
| 235 | } | 235 | } |
| 236 | #ifdef _LIBC | ||
| 237 | weak_alias (__re_compile_pattern, re_compile_pattern) | 236 | weak_alias (__re_compile_pattern, re_compile_pattern) |
| 238 | #endif | ||
| 239 | 237 | ||
| 240 | /* Set by 're_set_syntax' to the current regexp syntax to recognize. Can | 238 | /* Set by 're_set_syntax' to the current regexp syntax to recognize. Can |
| 241 | also be assigned to arbitrarily: each pattern buffer stores its own | 239 | also be assigned to arbitrarily: each pattern buffer stores its own |
| @@ -260,9 +258,7 @@ re_set_syntax (reg_syntax_t syntax) | |||
| 260 | re_syntax_options = syntax; | 258 | re_syntax_options = syntax; |
| 261 | return ret; | 259 | return ret; |
| 262 | } | 260 | } |
| 263 | #ifdef _LIBC | ||
| 264 | weak_alias (__re_set_syntax, re_set_syntax) | 261 | weak_alias (__re_set_syntax, re_set_syntax) |
| 265 | #endif | ||
| 266 | 262 | ||
| 267 | int | 263 | int |
| 268 | re_compile_fastmap (struct re_pattern_buffer *bufp) | 264 | re_compile_fastmap (struct re_pattern_buffer *bufp) |
| @@ -281,9 +277,7 @@ re_compile_fastmap (struct re_pattern_buffer *bufp) | |||
| 281 | bufp->fastmap_accurate = 1; | 277 | bufp->fastmap_accurate = 1; |
| 282 | return 0; | 278 | return 0; |
| 283 | } | 279 | } |
| 284 | #ifdef _LIBC | ||
| 285 | weak_alias (__re_compile_fastmap, re_compile_fastmap) | 280 | weak_alias (__re_compile_fastmap, re_compile_fastmap) |
| 286 | #endif | ||
| 287 | 281 | ||
| 288 | static inline void | 282 | static inline void |
| 289 | __attribute__ ((always_inline)) | 283 | __attribute__ ((always_inline)) |
| @@ -464,7 +458,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, | |||
| 464 | the return codes and their meanings.) */ | 458 | the return codes and their meanings.) */ |
| 465 | 459 | ||
| 466 | int | 460 | int |
| 467 | regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags) | 461 | regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags) |
| 468 | { | 462 | { |
| 469 | reg_errcode_t ret; | 463 | reg_errcode_t ret; |
| 470 | reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED | 464 | reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED |
| @@ -515,16 +509,14 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags) | |||
| 515 | 509 | ||
| 516 | return (int) ret; | 510 | return (int) ret; |
| 517 | } | 511 | } |
| 518 | #ifdef _LIBC | ||
| 519 | libc_hidden_def (__regcomp) | 512 | libc_hidden_def (__regcomp) |
| 520 | weak_alias (__regcomp, regcomp) | 513 | weak_alias (__regcomp, regcomp) |
| 521 | #endif | ||
| 522 | 514 | ||
| 523 | /* Returns a message corresponding to an error code, ERRCODE, returned | 515 | /* Returns a message corresponding to an error code, ERRCODE, returned |
| 524 | from either regcomp or regexec. We don't use PREG here. */ | 516 | from either regcomp or regexec. We don't use PREG here. */ |
| 525 | 517 | ||
| 526 | size_t | 518 | size_t |
| 527 | regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf, | 519 | regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf, |
| 528 | size_t errbuf_size) | 520 | size_t errbuf_size) |
| 529 | { | 521 | { |
| 530 | const char *msg; | 522 | const char *msg; |
| @@ -555,9 +547,7 @@ regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf, | |||
| 555 | 547 | ||
| 556 | return msg_size; | 548 | return msg_size; |
| 557 | } | 549 | } |
| 558 | #ifdef _LIBC | ||
| 559 | weak_alias (__regerror, regerror) | 550 | weak_alias (__regerror, regerror) |
| 560 | #endif | ||
| 561 | 551 | ||
| 562 | 552 | ||
| 563 | #ifdef RE_ENABLE_I18N | 553 | #ifdef RE_ENABLE_I18N |
| @@ -657,10 +647,8 @@ regfree (regex_t *preg) | |||
| 657 | re_free (preg->translate); | 647 | re_free (preg->translate); |
| 658 | preg->translate = NULL; | 648 | preg->translate = NULL; |
| 659 | } | 649 | } |
| 660 | #ifdef _LIBC | ||
| 661 | libc_hidden_def (__regfree) | 650 | libc_hidden_def (__regfree) |
| 662 | weak_alias (__regfree, regfree) | 651 | weak_alias (__regfree, regfree) |
| 663 | #endif | ||
| 664 | 652 | ||
| 665 | /* Entry points compatible with 4.2 BSD regex library. We don't define | 653 | /* Entry points compatible with 4.2 BSD regex library. We don't define |
| 666 | them unless specifically requested. */ | 654 | them unless specifically requested. */ |
| @@ -1812,8 +1800,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) | |||
| 1812 | token->word_char = 0; | 1800 | token->word_char = 0; |
| 1813 | #ifdef RE_ENABLE_I18N | 1801 | #ifdef RE_ENABLE_I18N |
| 1814 | token->mb_partial = 0; | 1802 | token->mb_partial = 0; |
| 1815 | if (input->mb_cur_max > 1 && | 1803 | if (input->mb_cur_max > 1 |
| 1816 | !re_string_first_byte (input, re_string_cur_idx (input))) | 1804 | && !re_string_first_byte (input, re_string_cur_idx (input))) |
| 1817 | { | 1805 | { |
| 1818 | token->type = CHARACTER; | 1806 | token->type = CHARACTER; |
| 1819 | token->mb_partial = 1; | 1807 | token->mb_partial = 1; |
| @@ -2000,8 +1988,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) | |||
| 2000 | token->type = OP_PERIOD; | 1988 | token->type = OP_PERIOD; |
| 2001 | break; | 1989 | break; |
| 2002 | case '^': | 1990 | case '^': |
| 2003 | if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && | 1991 | if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) |
| 2004 | re_string_cur_idx (input) != 0) | 1992 | && re_string_cur_idx (input) != 0) |
| 2005 | { | 1993 | { |
| 2006 | char prev = re_string_peek_byte (input, -1); | 1994 | char prev = re_string_peek_byte (input, -1); |
| 2007 | if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') | 1995 | if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') |
| @@ -2011,8 +1999,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) | |||
| 2011 | token->opr.ctx_type = LINE_FIRST; | 1999 | token->opr.ctx_type = LINE_FIRST; |
| 2012 | break; | 2000 | break; |
| 2013 | case '$': | 2001 | case '$': |
| 2014 | if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && | 2002 | if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) |
| 2015 | re_string_cur_idx (input) + 1 != re_string_length (input)) | 2003 | && re_string_cur_idx (input) + 1 != re_string_length (input)) |
| 2016 | { | 2004 | { |
| 2017 | re_token_t next; | 2005 | re_token_t next; |
| 2018 | re_string_skip_bytes (input, 1); | 2006 | re_string_skip_bytes (input, 1); |
| @@ -2046,8 +2034,8 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) | |||
| 2046 | token->opr.c = c; | 2034 | token->opr.c = c; |
| 2047 | 2035 | ||
| 2048 | #ifdef RE_ENABLE_I18N | 2036 | #ifdef RE_ENABLE_I18N |
| 2049 | if (input->mb_cur_max > 1 && | 2037 | if (input->mb_cur_max > 1 |
| 2050 | !re_string_first_byte (input, re_string_cur_idx (input))) | 2038 | && !re_string_first_byte (input, re_string_cur_idx (input))) |
| 2051 | { | 2039 | { |
| 2052 | token->type = CHARACTER; | 2040 | token->type = CHARACTER; |
| 2053 | return 1; | 2041 | return 1; |
| @@ -2345,8 +2333,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, | |||
| 2345 | } | 2333 | } |
| 2346 | FALLTHROUGH; | 2334 | FALLTHROUGH; |
| 2347 | case OP_CLOSE_SUBEXP: | 2335 | case OP_CLOSE_SUBEXP: |
| 2348 | if ((token->type == OP_CLOSE_SUBEXP) && | 2336 | if ((token->type == OP_CLOSE_SUBEXP) |
| 2349 | !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) | 2337 | && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) |
| 2350 | { | 2338 | { |
| 2351 | *err = REG_ERPAREN; | 2339 | *err = REG_ERPAREN; |
| 2352 | return NULL; | 2340 | return NULL; |
diff --git a/lib/regex.c b/lib/regex.c index 2a86e107039..eab7a48b240 100644 --- a/lib/regex.c +++ b/lib/regex.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
| @@ -20,10 +20,10 @@ | |||
| 20 | #ifndef _LIBC | 20 | #ifndef _LIBC |
| 21 | # include <libc-config.h> | 21 | # include <libc-config.h> |
| 22 | 22 | ||
| 23 | # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ | 23 | # if __GNUC_PREREQ (4, 6) |
| 24 | # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" | 24 | # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" |
| 25 | # endif | 25 | # endif |
| 26 | # if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ | 26 | # if __GNUC_PREREQ (4, 3) |
| 27 | # pragma GCC diagnostic ignored "-Wold-style-definition" | 27 | # pragma GCC diagnostic ignored "-Wold-style-definition" |
| 28 | # pragma GCC diagnostic ignored "-Wtype-limits" | 28 | # pragma GCC diagnostic ignored "-Wtype-limits" |
| 29 | # endif | 29 | # endif |
diff --git a/lib/regex.h b/lib/regex.h index f2ac9507adb..77ac1a559c4 100644 --- a/lib/regex.h +++ b/lib/regex.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Definitions for data structures and routines for the regular | 1 | /* Definitions for data structures and routines for the regular |
| 2 | expression library. | 2 | expression library. |
| 3 | Copyright (C) 1985, 1989-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1985, 1989-2019 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/lib/regex_internal.c b/lib/regex_internal.c index f13def37bf6..b592f06725c 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
diff --git a/lib/regex_internal.h b/lib/regex_internal.h index b0e49cd828f..a3aedda8915 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
| @@ -144,13 +144,8 @@ | |||
| 144 | # define __mbrtowc mbrtowc | 144 | # define __mbrtowc mbrtowc |
| 145 | # define __wcrtomb wcrtomb | 145 | # define __wcrtomb wcrtomb |
| 146 | # define __regfree regfree | 146 | # define __regfree regfree |
| 147 | # define attribute_hidden | ||
| 148 | #endif /* not _LIBC */ | 147 | #endif /* not _LIBC */ |
| 149 | 148 | ||
| 150 | #if __GNUC__ < 3 + (__GNUC_MINOR__ < 1) | ||
| 151 | # define __attribute__(arg) | ||
| 152 | #endif | ||
| 153 | |||
| 154 | #ifndef SSIZE_MAX | 149 | #ifndef SSIZE_MAX |
| 155 | # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) | 150 | # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) |
| 156 | #endif | 151 | #endif |
| @@ -868,23 +863,6 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx) | |||
| 868 | } | 863 | } |
| 869 | #endif /* RE_ENABLE_I18N */ | 864 | #endif /* RE_ENABLE_I18N */ |
| 870 | 865 | ||
| 871 | #ifndef __GNUC_PREREQ | ||
| 872 | # if defined __GNUC__ && defined __GNUC_MINOR__ | ||
| 873 | # define __GNUC_PREREQ(maj, min) \ | ||
| 874 | ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) | ||
| 875 | # else | ||
| 876 | # define __GNUC_PREREQ(maj, min) 0 | ||
| 877 | # endif | ||
| 878 | #endif | ||
| 879 | |||
| 880 | #if __GNUC_PREREQ (3,4) | ||
| 881 | # undef __attribute_warn_unused_result__ | ||
| 882 | # define __attribute_warn_unused_result__ \ | ||
| 883 | __attribute__ ((__warn_unused_result__)) | ||
| 884 | #else | ||
| 885 | # define __attribute_warn_unused_result__ /* empty */ | ||
| 886 | #endif | ||
| 887 | |||
| 888 | #ifndef FALLTHROUGH | 866 | #ifndef FALLTHROUGH |
| 889 | # if __GNUC__ < 7 | 867 | # if __GNUC__ < 7 |
| 890 | # define FALLTHROUGH ((void) 0) | 868 | # define FALLTHROUGH ((void) 0) |
diff --git a/lib/regexec.c b/lib/regexec.c index 8b82ea50d44..f464869fb03 100644 --- a/lib/regexec.c +++ b/lib/regexec.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Extended regular expression matching and search library. | 1 | /* Extended regular expression matching and search library. |
| 2 | Copyright (C) 2002-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2019 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. | 4 | Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. |
| 5 | 5 | ||
| @@ -189,7 +189,7 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len); | |||
| 189 | We return 0 if we find a match and REG_NOMATCH if not. */ | 189 | We return 0 if we find a match and REG_NOMATCH if not. */ |
| 190 | 190 | ||
| 191 | int | 191 | int |
| 192 | regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string, | 192 | regexec (const regex_t *__restrict preg, const char *__restrict string, |
| 193 | size_t nmatch, regmatch_t pmatch[], int eflags) | 193 | size_t nmatch, regmatch_t pmatch[], int eflags) |
| 194 | { | 194 | { |
| 195 | reg_errcode_t err; | 195 | reg_errcode_t err; |
| @@ -232,8 +232,8 @@ __typeof__ (__regexec) __compat_regexec; | |||
| 232 | 232 | ||
| 233 | int | 233 | int |
| 234 | attribute_compat_text_section | 234 | attribute_compat_text_section |
| 235 | __compat_regexec (const regex_t *_Restrict_ preg, | 235 | __compat_regexec (const regex_t *__restrict preg, |
| 236 | const char *_Restrict_ string, size_t nmatch, | 236 | const char *__restrict string, size_t nmatch, |
| 237 | regmatch_t pmatch[], int eflags) | 237 | regmatch_t pmatch[], int eflags) |
| 238 | { | 238 | { |
| 239 | return regexec (preg, string, nmatch, pmatch, | 239 | return regexec (preg, string, nmatch, pmatch, |
| @@ -1293,8 +1293,10 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, | |||
| 1293 | else if (naccepted) | 1293 | else if (naccepted) |
| 1294 | { | 1294 | { |
| 1295 | char *buf = (char *) re_string_get_buffer (&mctx->input); | 1295 | char *buf = (char *) re_string_get_buffer (&mctx->input); |
| 1296 | if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, | 1296 | if (mctx->input.valid_len - *pidx < naccepted |
| 1297 | naccepted) != 0) | 1297 | || (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, |
| 1298 | naccepted) | ||
| 1299 | != 0)) | ||
| 1298 | return -1; | 1300 | return -1; |
| 1299 | } | 1301 | } |
| 1300 | } | 1302 | } |
| @@ -2202,12 +2204,12 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, | |||
| 2202 | int naccepted; | 2204 | int naccepted; |
| 2203 | /* Check the node can accept "multi byte". */ | 2205 | /* Check the node can accept "multi byte". */ |
| 2204 | naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); | 2206 | naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); |
| 2205 | if (naccepted > 0 && str_idx + naccepted <= max_str_idx && | 2207 | if (naccepted > 0 && str_idx + naccepted <= max_str_idx |
| 2206 | !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], | 2208 | && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], |
| 2207 | dfa->nexts[node_idx])) | 2209 | dfa->nexts[node_idx])) |
| 2208 | /* The node can't accept the "multi byte", or the | 2210 | /* The node can't accept the "multi byte", or the |
| 2209 | destination was already thrown away, then the node | 2211 | destination was already thrown away, then the node |
| 2210 | could't accept the current input "multi byte". */ | 2212 | couldn't accept the current input "multi byte". */ |
| 2211 | naccepted = 0; | 2213 | naccepted = 0; |
| 2212 | /* Otherwise, it is sure that the node could accept | 2214 | /* Otherwise, it is sure that the node could accept |
| 2213 | 'naccepted' bytes input. */ | 2215 | 'naccepted' bytes input. */ |
| @@ -2783,8 +2785,11 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) | |||
| 2783 | return REG_ESPACE; | 2785 | return REG_ESPACE; |
| 2784 | err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, | 2786 | err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, |
| 2785 | bkref_str_idx); | 2787 | bkref_str_idx); |
| 2788 | buf = (const char *) re_string_get_buffer (&mctx->input); | ||
| 2786 | if (err == REG_NOMATCH) | 2789 | if (err == REG_NOMATCH) |
| 2787 | continue; | 2790 | continue; |
| 2791 | if (__glibc_unlikely (err != REG_NOERROR)) | ||
| 2792 | return err; | ||
| 2788 | } | 2793 | } |
| 2789 | } | 2794 | } |
| 2790 | return REG_NOERROR; | 2795 | return REG_NOERROR; |
| @@ -3777,10 +3782,10 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, | |||
| 3777 | /* FIXME: I don't think this if is needed, as both '\n' | 3782 | /* FIXME: I don't think this if is needed, as both '\n' |
| 3778 | and '\0' are char_len == 1. */ | 3783 | and '\0' are char_len == 1. */ |
| 3779 | /* '.' accepts any one character except the following two cases. */ | 3784 | /* '.' accepts any one character except the following two cases. */ |
| 3780 | if ((!(dfa->syntax & RE_DOT_NEWLINE) && | 3785 | if ((!(dfa->syntax & RE_DOT_NEWLINE) |
| 3781 | re_string_byte_at (input, str_idx) == '\n') || | 3786 | && re_string_byte_at (input, str_idx) == '\n') |
| 3782 | ((dfa->syntax & RE_DOT_NOT_NULL) && | 3787 | || ((dfa->syntax & RE_DOT_NOT_NULL) |
| 3783 | re_string_byte_at (input, str_idx) == '\0')) | 3788 | && re_string_byte_at (input, str_idx) == '\0')) |
| 3784 | return 0; | 3789 | return 0; |
| 3785 | return char_len; | 3790 | return char_len; |
| 3786 | } | 3791 | } |
diff --git a/lib/root-uid.h b/lib/root-uid.h index 4af7d95aba4..eebfa943c45 100644 --- a/lib/root-uid.h +++ b/lib/root-uid.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* The user ID that always has appropriate privileges in the POSIX sense. | 1 | /* The user ID that always has appropriate privileges in the POSIX sense. |
| 2 | 2 | ||
| 3 | Copyright 2012-2018 Free Software Foundation, Inc. | 3 | Copyright 2012-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/save-cwd.c b/lib/save-cwd.c index 5020facbb4e..a7c4745b61f 100644 --- a/lib/save-cwd.c +++ b/lib/save-cwd.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* save-cwd.c -- Save and restore current working directory. | 1 | /* save-cwd.c -- Save and restore current working directory. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2018 Free Software | 3 | Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/save-cwd.h b/lib/save-cwd.h index 88c85052265..2fa6e75cc0a 100644 --- a/lib/save-cwd.h +++ b/lib/save-cwd.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Save and restore current working directory. | 1 | /* Save and restore current working directory. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995, 1997-1998, 2003, 2009-2018 Free Software | 3 | Copyright (C) 1995, 1997-1998, 2003, 2009-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/set-permissions.c b/lib/set-permissions.c index a415e133ac7..38cd30a5a1c 100644 --- a/lib/set-permissions.c +++ b/lib/set-permissions.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Set permissions of a file. -*- coding: utf-8 -*- | 1 | /* Set permissions of a file. -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2002-2003, 2005-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002-2003, 2005-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/sha1.c b/lib/sha1.c index cd79dfa8770..d94c4373a55 100644 --- a/lib/sha1.c +++ b/lib/sha1.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* sha1.c - Functions to compute SHA1 message digest of files or | 1 | /* sha1.c - Functions to compute SHA1 message digest of files or |
| 2 | memory blocks according to the NIST specification FIPS-180-1. | 2 | memory blocks according to the NIST specification FIPS-180-1. |
| 3 | 3 | ||
| 4 | Copyright (C) 2000-2001, 2003-2006, 2008-2018 Free Software Foundation, Inc. | 4 | Copyright (C) 2000-2001, 2003-2006, 2008-2019 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
| 7 | under the terms of the GNU General Public License as published by the | 7 | under the terms of the GNU General Public License as published by the |
diff --git a/lib/sha1.h b/lib/sha1.h index 9419750f485..617f7b0169a 100644 --- a/lib/sha1.h +++ b/lib/sha1.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Declarations of functions and data types used for SHA1 sum | 1 | /* Declarations of functions and data types used for SHA1 sum |
| 2 | library functions. | 2 | library functions. |
| 3 | Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2018 Free Software | 3 | Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
diff --git a/lib/sha256.c b/lib/sha256.c index c518517077c..721e944a79f 100644 --- a/lib/sha256.c +++ b/lib/sha256.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* sha256.c - Functions to compute SHA256 and SHA224 message digest of files or | 1 | /* sha256.c - Functions to compute SHA256 and SHA224 message digest of files or |
| 2 | memory blocks according to the NIST specification FIPS-180-2. | 2 | memory blocks according to the NIST specification FIPS-180-2. |
| 3 | 3 | ||
| 4 | Copyright (C) 2005-2006, 2008-2018 Free Software Foundation, Inc. | 4 | Copyright (C) 2005-2006, 2008-2019 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/sha256.h b/lib/sha256.h index 19ed3ccd4d0..b1ccb2aeb6b 100644 --- a/lib/sha256.h +++ b/lib/sha256.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Declarations of functions and data types used for SHA256 and SHA224 sum | 1 | /* Declarations of functions and data types used for SHA256 and SHA224 sum |
| 2 | library functions. | 2 | library functions. |
| 3 | Copyright (C) 2005-2006, 2008-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2005-2006, 2008-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/sha512.c b/lib/sha512.c index e854951eb31..e7f5bd5a159 100644 --- a/lib/sha512.c +++ b/lib/sha512.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* sha512.c - Functions to compute SHA512 and SHA384 message digest of files or | 1 | /* sha512.c - Functions to compute SHA512 and SHA384 message digest of files or |
| 2 | memory blocks according to the NIST specification FIPS-180-2. | 2 | memory blocks according to the NIST specification FIPS-180-2. |
| 3 | 3 | ||
| 4 | Copyright (C) 2005-2006, 2008-2018 Free Software Foundation, Inc. | 4 | Copyright (C) 2005-2006, 2008-2019 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/sha512.h b/lib/sha512.h index 2c39ab195cf..7e8cc2852aa 100644 --- a/lib/sha512.h +++ b/lib/sha512.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Declarations of functions and data types used for SHA512 and SHA384 sum | 1 | /* Declarations of functions and data types used for SHA512 and SHA384 sum |
| 2 | library functions. | 2 | library functions. |
| 3 | Copyright (C) 2005-2006, 2008-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2005-2006, 2008-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/sig2str.c b/lib/sig2str.c index 72b075e7818..cd5bd4d70c7 100644 --- a/lib/sig2str.c +++ b/lib/sig2str.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* sig2str.c -- convert between signal names and numbers | 1 | /* sig2str.c -- convert between signal names and numbers |
| 2 | 2 | ||
| 3 | Copyright (C) 2002, 2004, 2006, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002, 2004, 2006, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/sig2str.h b/lib/sig2str.h index 69887d4632d..32e0d26ff0f 100644 --- a/lib/sig2str.h +++ b/lib/sig2str.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* sig2str.h -- convert between signal names and numbers | 1 | /* sig2str.h -- convert between signal names and numbers |
| 2 | 2 | ||
| 3 | Copyright (C) 2002, 2005, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002, 2005, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/signal.in.h b/lib/signal.in.h index 7d4927b828e..a6960a252d9 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <signal.h>. | 1 | /* A GNU-like <signal.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2006-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2006-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/stat-time.h b/lib/stat-time.h index 69ebe85df1d..38a1f55a6cf 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* stat-related time functions. | 1 | /* stat-related time functions. |
| 2 | 2 | ||
| 3 | Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2005, 2007, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -171,7 +171,7 @@ get_stat_birthtime (struct stat const *st _GL_UNUSED) | |||
| 171 | #elif defined _WIN32 && ! defined __CYGWIN__ | 171 | #elif defined _WIN32 && ! defined __CYGWIN__ |
| 172 | /* Native Windows platforms (but not Cygwin) put the "file creation | 172 | /* Native Windows platforms (but not Cygwin) put the "file creation |
| 173 | time" in st_ctime (!). See | 173 | time" in st_ctime (!). See |
| 174 | <https://msdn.microsoft.com/en-us/library/14h5k7ff(VS.80).aspx>. */ | 174 | <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions>. */ |
| 175 | # if _GL_WINDOWS_STAT_TIMESPEC | 175 | # if _GL_WINDOWS_STAT_TIMESPEC |
| 176 | t = st->st_ctim; | 176 | t = st->st_ctim; |
| 177 | # else | 177 | # else |
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index bbfa9ac3d15..d988d7c19bf 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A substitute for ISO C11 <stdalign.h>. | 1 | /* A substitute for ISO C11 <stdalign.h>. |
| 2 | 2 | ||
| 3 | Copyright 2011-2018 Free Software Foundation, Inc. | 3 | Copyright 2011-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 8329a9bf8d3..5aad1210df0 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. | 1 | /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. |
| 2 | 2 | ||
| 3 | Copyright (C) 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 94e7c81cef3..21dd8d23e3c 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 2001-2002, 2004-2018 Free Software Foundation, Inc. | 1 | /* Copyright (C) 2001-2002, 2004-2019 Free Software Foundation, Inc. |
| 2 | Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. | 2 | Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. |
| 3 | This file is part of gnulib. | 3 | This file is part of gnulib. |
| 4 | 4 | ||
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 393ef0cf58d..4260468b612 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Implementation details of FILE streams. | 1 | /* Implementation details of FILE streams. |
| 2 | Copyright (C) 2007-2008, 2010-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2008, 2010-2019 Free Software Foundation, Inc. |
| 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 |
| @@ -61,6 +61,11 @@ | |||
| 61 | # define _r pub._r | 61 | # define _r pub._r |
| 62 | # define _w pub._w | 62 | # define _w pub._w |
| 63 | # elif defined __ANDROID__ /* Android */ | 63 | # elif defined __ANDROID__ /* Android */ |
| 64 | # ifdef __LP64__ | ||
| 65 | # define _gl_flags_file_t int | ||
| 66 | # else | ||
| 67 | # define _gl_flags_file_t short | ||
| 68 | # endif | ||
| 64 | /* Up to this commit from 2015-10-12 | 69 | /* Up to this commit from 2015-10-12 |
| 65 | <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a> | 70 | <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a> |
| 66 | the innards of FILE were public, and fp_ub could be defined like for OpenBSD, | 71 | the innards of FILE were public, and fp_ub could be defined like for OpenBSD, |
| @@ -70,8 +75,8 @@ | |||
| 70 | # define fp_ ((struct { unsigned char *_p; \ | 75 | # define fp_ ((struct { unsigned char *_p; \ |
| 71 | int _r; \ | 76 | int _r; \ |
| 72 | int _w; \ | 77 | int _w; \ |
| 73 | int _flags; \ | 78 | _gl_flags_file_t _flags; \ |
| 74 | int _file; \ | 79 | _gl_flags_file_t _file; \ |
| 75 | struct { unsigned char *_base; size_t _size; } _bf; \ | 80 | struct { unsigned char *_base; size_t _size; } _bf; \ |
| 76 | int _lbfsize; \ | 81 | int _lbfsize; \ |
| 77 | void *_cookie; \ | 82 | void *_cookie; \ |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index ff7c9c831ac..4a8aa55528b 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <stdio.h>. | 1 | /* A GNU-like <stdio.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2004, 2007-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2004, 2007-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -118,6 +118,13 @@ | |||
| 118 | # include <unistd.h> | 118 | # include <unistd.h> |
| 119 | #endif | 119 | #endif |
| 120 | 120 | ||
| 121 | /* Android 4.3 declares renameat in <sys/stat.h>, not in <stdio.h>. */ | ||
| 122 | /* But in any case avoid namespace pollution on glibc systems. */ | ||
| 123 | #if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ | ||
| 124 | && ! defined __GLIBC__ | ||
| 125 | # include <sys/stat.h> | ||
| 126 | #endif | ||
| 127 | |||
| 121 | /* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include | 128 | /* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include |
| 122 | it before we #define perror rpl_perror. */ | 129 | it before we #define perror rpl_perror. */ |
| 123 | /* But in any case avoid namespace pollution on glibc systems. */ | 130 | /* But in any case avoid namespace pollution on glibc systems. */ |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 441c018ec18..f829525c104 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <stdlib.h>. | 1 | /* A GNU-like <stdlib.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995, 2001-2004, 2006-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1995, 2001-2004, 2006-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -306,9 +306,18 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " | |||
| 306 | _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); | 306 | _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); |
| 307 | _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); | 307 | _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); |
| 308 | # else | 308 | # else |
| 309 | # if !@HAVE_MBTOWC@ | ||
| 310 | _GL_FUNCDECL_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); | ||
| 311 | # endif | ||
| 309 | _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); | 312 | _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); |
| 310 | # endif | 313 | # endif |
| 311 | _GL_CXXALIASWARN (mbtowc); | 314 | _GL_CXXALIASWARN (mbtowc); |
| 315 | #elif defined GNULIB_POSIXCHECK | ||
| 316 | # undef mbtowc | ||
| 317 | # if HAVE_RAW_DECL_MBTOWC | ||
| 318 | _GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " | ||
| 319 | "use gnulib module mbtowc for portability"); | ||
| 320 | # endif | ||
| 312 | #endif | 321 | #endif |
| 313 | 322 | ||
| 314 | #if @GNULIB_MKDTEMP@ | 323 | #if @GNULIB_MKDTEMP@ |
| @@ -573,10 +582,19 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " | |||
| 573 | 582 | ||
| 574 | 583 | ||
| 575 | #if @GNULIB_RANDOM@ | 584 | #if @GNULIB_RANDOM@ |
| 576 | # if !@HAVE_RANDOM@ | 585 | # if @REPLACE_RANDOM@ |
| 586 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 587 | # undef random | ||
| 588 | # define random rpl_random | ||
| 589 | # endif | ||
| 590 | _GL_FUNCDECL_RPL (random, long, (void)); | ||
| 591 | _GL_CXXALIAS_RPL (random, long, (void)); | ||
| 592 | # else | ||
| 593 | # if !@HAVE_RANDOM@ | ||
| 577 | _GL_FUNCDECL_SYS (random, long, (void)); | 594 | _GL_FUNCDECL_SYS (random, long, (void)); |
| 578 | # endif | 595 | # endif |
| 579 | _GL_CXXALIAS_SYS (random, long, (void)); | 596 | _GL_CXXALIAS_SYS (random, long, (void)); |
| 597 | # endif | ||
| 580 | _GL_CXXALIASWARN (random); | 598 | _GL_CXXALIASWARN (random); |
| 581 | #elif defined GNULIB_POSIXCHECK | 599 | #elif defined GNULIB_POSIXCHECK |
| 582 | # undef random | 600 | # undef random |
| @@ -587,10 +605,19 @@ _GL_WARN_ON_USE (random, "random is unportable - " | |||
| 587 | #endif | 605 | #endif |
| 588 | 606 | ||
| 589 | #if @GNULIB_RANDOM@ | 607 | #if @GNULIB_RANDOM@ |
| 590 | # if !@HAVE_RANDOM@ | 608 | # if @REPLACE_RANDOM@ |
| 609 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 610 | # undef srandom | ||
| 611 | # define srandom rpl_srandom | ||
| 612 | # endif | ||
| 613 | _GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); | ||
| 614 | _GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); | ||
| 615 | # else | ||
| 616 | # if !@HAVE_RANDOM@ | ||
| 591 | _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); | 617 | _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); |
| 592 | # endif | 618 | # endif |
| 593 | _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); | 619 | _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); |
| 620 | # endif | ||
| 594 | _GL_CXXALIASWARN (srandom); | 621 | _GL_CXXALIASWARN (srandom); |
| 595 | #elif defined GNULIB_POSIXCHECK | 622 | #elif defined GNULIB_POSIXCHECK |
| 596 | # undef srandom | 623 | # undef srandom |
| @@ -601,31 +628,52 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - " | |||
| 601 | #endif | 628 | #endif |
| 602 | 629 | ||
| 603 | #if @GNULIB_RANDOM@ | 630 | #if @GNULIB_RANDOM@ |
| 604 | # if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@ | 631 | # if @REPLACE_INITSTATE@ |
| 632 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 633 | # undef initstate | ||
| 634 | # define initstate rpl_initstate | ||
| 635 | # endif | ||
| 636 | _GL_FUNCDECL_RPL (initstate, char *, | ||
| 637 | (unsigned int seed, char *buf, size_t buf_size) | ||
| 638 | _GL_ARG_NONNULL ((2))); | ||
| 639 | _GL_CXXALIAS_RPL (initstate, char *, | ||
| 640 | (unsigned int seed, char *buf, size_t buf_size)); | ||
| 641 | # else | ||
| 642 | # if !@HAVE_INITSTATE@ || !@HAVE_DECL_INITSTATE@ | ||
| 605 | _GL_FUNCDECL_SYS (initstate, char *, | 643 | _GL_FUNCDECL_SYS (initstate, char *, |
| 606 | (unsigned int seed, char *buf, size_t buf_size) | 644 | (unsigned int seed, char *buf, size_t buf_size) |
| 607 | _GL_ARG_NONNULL ((2))); | 645 | _GL_ARG_NONNULL ((2))); |
| 608 | # endif | 646 | # endif |
| 609 | _GL_CXXALIAS_SYS (initstate, char *, | 647 | _GL_CXXALIAS_SYS (initstate, char *, |
| 610 | (unsigned int seed, char *buf, size_t buf_size)); | 648 | (unsigned int seed, char *buf, size_t buf_size)); |
| 649 | # endif | ||
| 611 | _GL_CXXALIASWARN (initstate); | 650 | _GL_CXXALIASWARN (initstate); |
| 612 | #elif defined GNULIB_POSIXCHECK | 651 | #elif defined GNULIB_POSIXCHECK |
| 613 | # undef initstate | 652 | # undef initstate |
| 614 | # if HAVE_RAW_DECL_INITSTATE_R | 653 | # if HAVE_RAW_DECL_INITSTATE |
| 615 | _GL_WARN_ON_USE (initstate, "initstate is unportable - " | 654 | _GL_WARN_ON_USE (initstate, "initstate is unportable - " |
| 616 | "use gnulib module random for portability"); | 655 | "use gnulib module random for portability"); |
| 617 | # endif | 656 | # endif |
| 618 | #endif | 657 | #endif |
| 619 | 658 | ||
| 620 | #if @GNULIB_RANDOM@ | 659 | #if @GNULIB_RANDOM@ |
| 621 | # if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@ | 660 | # if @REPLACE_SETSTATE@ |
| 661 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 662 | # undef setstate | ||
| 663 | # define setstate rpl_setstate | ||
| 664 | # endif | ||
| 665 | _GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); | ||
| 666 | _GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); | ||
| 667 | # else | ||
| 668 | # if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@ | ||
| 622 | _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); | 669 | _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); |
| 623 | # endif | 670 | # endif |
| 624 | _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); | 671 | _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); |
| 672 | # endif | ||
| 625 | _GL_CXXALIASWARN (setstate); | 673 | _GL_CXXALIASWARN (setstate); |
| 626 | #elif defined GNULIB_POSIXCHECK | 674 | #elif defined GNULIB_POSIXCHECK |
| 627 | # undef setstate | 675 | # undef setstate |
| 628 | # if HAVE_RAW_DECL_SETSTATE_R | 676 | # if HAVE_RAW_DECL_SETSTATE |
| 629 | _GL_WARN_ON_USE (setstate, "setstate is unportable - " | 677 | _GL_WARN_ON_USE (setstate, "setstate is unportable - " |
| 630 | "use gnulib module random for portability"); | 678 | "use gnulib module random for portability"); |
| 631 | # endif | 679 | # endif |
| @@ -881,6 +929,7 @@ _GL_WARN_ON_USE (setenv, "setenv is unportable - " | |||
| 881 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 929 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 882 | # define strtod rpl_strtod | 930 | # define strtod rpl_strtod |
| 883 | # endif | 931 | # endif |
| 932 | # define GNULIB_defined_strtod_function 1 | ||
| 884 | _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) | 933 | _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) |
| 885 | _GL_ARG_NONNULL ((1))); | 934 | _GL_ARG_NONNULL ((1))); |
| 886 | _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); | 935 | _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); |
| @@ -900,6 +949,32 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - " | |||
| 900 | # endif | 949 | # endif |
| 901 | #endif | 950 | #endif |
| 902 | 951 | ||
| 952 | #if @GNULIB_STRTOLD@ | ||
| 953 | /* Parse a 'long double' from STRING, updating ENDP if appropriate. */ | ||
| 954 | # if @REPLACE_STRTOLD@ | ||
| 955 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 956 | # define strtold rpl_strtold | ||
| 957 | # endif | ||
| 958 | # define GNULIB_defined_strtold_function 1 | ||
| 959 | _GL_FUNCDECL_RPL (strtold, long double, (const char *str, char **endp) | ||
| 960 | _GL_ARG_NONNULL ((1))); | ||
| 961 | _GL_CXXALIAS_RPL (strtold, long double, (const char *str, char **endp)); | ||
| 962 | # else | ||
| 963 | # if !@HAVE_STRTOLD@ | ||
| 964 | _GL_FUNCDECL_SYS (strtold, long double, (const char *str, char **endp) | ||
| 965 | _GL_ARG_NONNULL ((1))); | ||
| 966 | # endif | ||
| 967 | _GL_CXXALIAS_SYS (strtold, long double, (const char *str, char **endp)); | ||
| 968 | # endif | ||
| 969 | _GL_CXXALIASWARN (strtold); | ||
| 970 | #elif defined GNULIB_POSIXCHECK | ||
| 971 | # undef strtold | ||
| 972 | # if HAVE_RAW_DECL_STRTOLD | ||
| 973 | _GL_WARN_ON_USE (strtold, "strtold is unportable - " | ||
| 974 | "use gnulib module strtold for portability"); | ||
| 975 | # endif | ||
| 976 | #endif | ||
| 977 | |||
| 903 | #if @GNULIB_STRTOLL@ | 978 | #if @GNULIB_STRTOLL@ |
| 904 | /* Parse a signed integer whose textual representation starts at STRING. | 979 | /* Parse a signed integer whose textual representation starts at STRING. |
| 905 | The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, | 980 | The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, |
diff --git a/lib/stpcpy.c b/lib/stpcpy.c index 61239e9f1d7..a1d32fdaf81 100644 --- a/lib/stpcpy.c +++ b/lib/stpcpy.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* stpcpy.c -- copy a string and return pointer to end of new string | 1 | /* stpcpy.c -- copy a string and return pointer to end of new string |
| 2 | Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2018 Free Software | 2 | Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2019 Free Software |
| 3 | Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | NOTE: The canonical source of this file is maintained with the GNU C Library. | 5 | NOTE: The canonical source of this file is maintained with the GNU C Library. |
diff --git a/lib/str-two-way.h b/lib/str-two-way.h new file mode 100644 index 00000000000..7078c34bdc7 --- /dev/null +++ b/lib/str-two-way.h | |||
| @@ -0,0 +1,452 @@ | |||
| 1 | /* Byte-wise substring search, using the Two-Way algorithm. | ||
| 2 | Copyright (C) 2008-2019 Free Software Foundation, Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | Written by Eric Blake <ebb9@byu.net>, 2008. | ||
| 5 | |||
| 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 | ||
| 8 | the Free Software Foundation; either version 3, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License along | ||
| 17 | with this program; if not, see <https://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | /* Before including this file, you need to include <config.h> and | ||
| 20 | <string.h>, and define: | ||
| 21 | RETURN_TYPE A macro that expands to the return type. | ||
| 22 | AVAILABLE(h, h_l, j, n_l) | ||
| 23 | A macro that returns nonzero if there are | ||
| 24 | at least N_L bytes left starting at H[J]. | ||
| 25 | H is 'unsigned char *', H_L, J, and N_L | ||
| 26 | are 'size_t'; H_L is an lvalue. For | ||
| 27 | NUL-terminated searches, H_L can be | ||
| 28 | modified each iteration to avoid having | ||
| 29 | to compute the end of H up front. | ||
| 30 | |||
| 31 | For case-insensitivity, you may optionally define: | ||
| 32 | CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L | ||
| 33 | characters of P1 and P2 are equal. | ||
| 34 | CANON_ELEMENT(c) A macro that canonicalizes an element right after | ||
| 35 | it has been fetched from one of the two strings. | ||
| 36 | The argument is an 'unsigned char'; the result | ||
| 37 | must be an 'unsigned char' as well. | ||
| 38 | |||
| 39 | This file undefines the macros documented above, and defines | ||
| 40 | LONG_NEEDLE_THRESHOLD. | ||
| 41 | */ | ||
| 42 | |||
| 43 | #include <limits.h> | ||
| 44 | #include <stdint.h> | ||
| 45 | |||
| 46 | /* We use the Two-Way string matching algorithm (also known as | ||
| 47 | Chrochemore-Perrin), which guarantees linear complexity with | ||
| 48 | constant space. Additionally, for long needles, we also use a bad | ||
| 49 | character shift table similar to the Boyer-Moore algorithm to | ||
| 50 | achieve improved (potentially sub-linear) performance. | ||
| 51 | |||
| 52 | See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, | ||
| 53 | https://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, | ||
| 54 | https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf | ||
| 55 | */ | ||
| 56 | |||
| 57 | /* Point at which computing a bad-byte shift table is likely to be | ||
| 58 | worthwhile. Small needles should not compute a table, since it | ||
| 59 | adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a | ||
| 60 | speedup no greater than a factor of NEEDLE_LEN. The larger the | ||
| 61 | needle, the better the potential performance gain. On the other | ||
| 62 | hand, on non-POSIX systems with CHAR_BIT larger than eight, the | ||
| 63 | memory required for the table is prohibitive. */ | ||
| 64 | #if CHAR_BIT < 10 | ||
| 65 | # define LONG_NEEDLE_THRESHOLD 32U | ||
| 66 | #else | ||
| 67 | # define LONG_NEEDLE_THRESHOLD SIZE_MAX | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #ifndef MAX | ||
| 71 | # define MAX(a, b) ((a < b) ? (b) : (a)) | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #ifndef CANON_ELEMENT | ||
| 75 | # define CANON_ELEMENT(c) c | ||
| 76 | #endif | ||
| 77 | #ifndef CMP_FUNC | ||
| 78 | # define CMP_FUNC memcmp | ||
| 79 | #endif | ||
| 80 | |||
| 81 | /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. | ||
| 82 | Return the index of the first byte in the right half, and set | ||
| 83 | *PERIOD to the global period of the right half. | ||
| 84 | |||
| 85 | The global period of a string is the smallest index (possibly its | ||
| 86 | length) at which all remaining bytes in the string are repetitions | ||
| 87 | of the prefix (the last repetition may be a subset of the prefix). | ||
| 88 | |||
| 89 | When NEEDLE is factored into two halves, a local period is the | ||
| 90 | length of the smallest word that shares a suffix with the left half | ||
| 91 | and shares a prefix with the right half. All factorizations of a | ||
| 92 | non-empty NEEDLE have a local period of at least 1 and no greater | ||
| 93 | than NEEDLE_LEN. | ||
| 94 | |||
| 95 | A critical factorization has the property that the local period | ||
| 96 | equals the global period. All strings have at least one critical | ||
| 97 | factorization with the left half smaller than the global period. | ||
| 98 | And while some strings have more than one critical factorization, | ||
| 99 | it is provable that with an ordered alphabet, at least one of the | ||
| 100 | critical factorizations corresponds to a maximal suffix. | ||
| 101 | |||
| 102 | Given an ordered alphabet, a critical factorization can be computed | ||
| 103 | in linear time, with 2 * NEEDLE_LEN comparisons, by computing the | ||
| 104 | shorter of two ordered maximal suffixes. The ordered maximal | ||
| 105 | suffixes are determined by lexicographic comparison while tracking | ||
| 106 | periodicity. */ | ||
| 107 | static size_t | ||
| 108 | critical_factorization (const unsigned char *needle, size_t needle_len, | ||
| 109 | size_t *period) | ||
| 110 | { | ||
| 111 | /* Index of last byte of left half, or SIZE_MAX. */ | ||
| 112 | size_t max_suffix, max_suffix_rev; | ||
| 113 | size_t j; /* Index into NEEDLE for current candidate suffix. */ | ||
| 114 | size_t k; /* Offset into current period. */ | ||
| 115 | size_t p; /* Intermediate period. */ | ||
| 116 | unsigned char a, b; /* Current comparison bytes. */ | ||
| 117 | |||
| 118 | /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered | ||
| 119 | out 0-length needles. */ | ||
| 120 | if (needle_len < 3) | ||
| 121 | { | ||
| 122 | *period = 1; | ||
| 123 | return needle_len - 1; | ||
| 124 | } | ||
| 125 | |||
| 126 | /* Invariants: | ||
| 127 | 0 <= j < NEEDLE_LEN - 1 | ||
| 128 | -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed) | ||
| 129 | min(max_suffix, max_suffix_rev) < global period of NEEDLE | ||
| 130 | 1 <= p <= global period of NEEDLE | ||
| 131 | p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] | ||
| 132 | 1 <= k <= p | ||
| 133 | */ | ||
| 134 | |||
| 135 | /* Perform lexicographic search. */ | ||
| 136 | max_suffix = SIZE_MAX; | ||
| 137 | j = 0; | ||
| 138 | k = p = 1; | ||
| 139 | while (j + k < needle_len) | ||
| 140 | { | ||
| 141 | a = CANON_ELEMENT (needle[j + k]); | ||
| 142 | b = CANON_ELEMENT (needle[max_suffix + k]); | ||
| 143 | if (a < b) | ||
| 144 | { | ||
| 145 | /* Suffix is smaller, period is entire prefix so far. */ | ||
| 146 | j += k; | ||
| 147 | k = 1; | ||
| 148 | p = j - max_suffix; | ||
| 149 | } | ||
| 150 | else if (a == b) | ||
| 151 | { | ||
| 152 | /* Advance through repetition of the current period. */ | ||
| 153 | if (k != p) | ||
| 154 | ++k; | ||
| 155 | else | ||
| 156 | { | ||
| 157 | j += p; | ||
| 158 | k = 1; | ||
| 159 | } | ||
| 160 | } | ||
| 161 | else /* b < a */ | ||
| 162 | { | ||
| 163 | /* Suffix is larger, start over from current location. */ | ||
| 164 | max_suffix = j++; | ||
| 165 | k = p = 1; | ||
| 166 | } | ||
| 167 | } | ||
| 168 | *period = p; | ||
| 169 | |||
| 170 | /* Perform reverse lexicographic search. */ | ||
| 171 | max_suffix_rev = SIZE_MAX; | ||
| 172 | j = 0; | ||
| 173 | k = p = 1; | ||
| 174 | while (j + k < needle_len) | ||
| 175 | { | ||
| 176 | a = CANON_ELEMENT (needle[j + k]); | ||
| 177 | b = CANON_ELEMENT (needle[max_suffix_rev + k]); | ||
| 178 | if (b < a) | ||
| 179 | { | ||
| 180 | /* Suffix is smaller, period is entire prefix so far. */ | ||
| 181 | j += k; | ||
| 182 | k = 1; | ||
| 183 | p = j - max_suffix_rev; | ||
| 184 | } | ||
| 185 | else if (a == b) | ||
| 186 | { | ||
| 187 | /* Advance through repetition of the current period. */ | ||
| 188 | if (k != p) | ||
| 189 | ++k; | ||
| 190 | else | ||
| 191 | { | ||
| 192 | j += p; | ||
| 193 | k = 1; | ||
| 194 | } | ||
| 195 | } | ||
| 196 | else /* a < b */ | ||
| 197 | { | ||
| 198 | /* Suffix is larger, start over from current location. */ | ||
| 199 | max_suffix_rev = j++; | ||
| 200 | k = p = 1; | ||
| 201 | } | ||
| 202 | } | ||
| 203 | |||
| 204 | /* Choose the shorter suffix. Return the index of the first byte of | ||
| 205 | the right half, rather than the last byte of the left half. | ||
| 206 | |||
| 207 | For some examples, 'banana' has two critical factorizations, both | ||
| 208 | exposed by the two lexicographic extreme suffixes of 'anana' and | ||
| 209 | 'nana', where both suffixes have a period of 2. On the other | ||
| 210 | hand, with 'aab' and 'bba', both strings have a single critical | ||
| 211 | factorization of the last byte, with the suffix having a period | ||
| 212 | of 1. While the maximal lexicographic suffix of 'aab' is 'b', | ||
| 213 | the maximal lexicographic suffix of 'bba' is 'ba', which is not a | ||
| 214 | critical factorization. Conversely, the maximal reverse | ||
| 215 | lexicographic suffix of 'a' works for 'bba', but not 'ab' for | ||
| 216 | 'aab'. The shorter suffix of the two will always be a critical | ||
| 217 | factorization. */ | ||
| 218 | if (max_suffix_rev + 1 < max_suffix + 1) | ||
| 219 | return max_suffix + 1; | ||
| 220 | *period = p; | ||
| 221 | return max_suffix_rev + 1; | ||
| 222 | } | ||
| 223 | |||
| 224 | /* Return the first location of non-empty NEEDLE within HAYSTACK, or | ||
| 225 | NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This | ||
| 226 | method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. | ||
| 227 | Performance is guaranteed to be linear, with an initialization cost | ||
| 228 | of 2 * NEEDLE_LEN comparisons. | ||
| 229 | |||
| 230 | If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at | ||
| 231 | most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. | ||
| 232 | If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * | ||
| 233 | HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ | ||
| 234 | static RETURN_TYPE | ||
| 235 | two_way_short_needle (const unsigned char *haystack, size_t haystack_len, | ||
| 236 | const unsigned char *needle, size_t needle_len) | ||
| 237 | { | ||
| 238 | size_t i; /* Index into current byte of NEEDLE. */ | ||
| 239 | size_t j; /* Index into current window of HAYSTACK. */ | ||
| 240 | size_t period; /* The period of the right half of needle. */ | ||
| 241 | size_t suffix; /* The index of the right half of needle. */ | ||
| 242 | |||
| 243 | /* Factor the needle into two halves, such that the left half is | ||
| 244 | smaller than the global period, and the right half is | ||
| 245 | periodic (with a period as large as NEEDLE_LEN - suffix). */ | ||
| 246 | suffix = critical_factorization (needle, needle_len, &period); | ||
| 247 | |||
| 248 | /* Perform the search. Each iteration compares the right half | ||
| 249 | first. */ | ||
| 250 | if (CMP_FUNC (needle, needle + period, suffix) == 0) | ||
| 251 | { | ||
| 252 | /* Entire needle is periodic; a mismatch in the left half can | ||
| 253 | only advance by the period, so use memory to avoid rescanning | ||
| 254 | known occurrences of the period in the right half. */ | ||
| 255 | size_t memory = 0; | ||
| 256 | j = 0; | ||
| 257 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) | ||
| 258 | { | ||
| 259 | /* Scan for matches in right half. */ | ||
| 260 | i = MAX (suffix, memory); | ||
| 261 | while (i < needle_len && (CANON_ELEMENT (needle[i]) | ||
| 262 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 263 | ++i; | ||
| 264 | if (needle_len <= i) | ||
| 265 | { | ||
| 266 | /* Scan for matches in left half. */ | ||
| 267 | i = suffix - 1; | ||
| 268 | while (memory < i + 1 && (CANON_ELEMENT (needle[i]) | ||
| 269 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 270 | --i; | ||
| 271 | if (i + 1 < memory + 1) | ||
| 272 | return (RETURN_TYPE) (haystack + j); | ||
| 273 | /* No match, so remember how many repetitions of period | ||
| 274 | on the right half were scanned. */ | ||
| 275 | j += period; | ||
| 276 | memory = needle_len - period; | ||
| 277 | } | ||
| 278 | else | ||
| 279 | { | ||
| 280 | j += i - suffix + 1; | ||
| 281 | memory = 0; | ||
| 282 | } | ||
| 283 | } | ||
| 284 | } | ||
| 285 | else | ||
| 286 | { | ||
| 287 | /* The two halves of needle are distinct; no extra memory is | ||
| 288 | required, and any mismatch results in a maximal shift. */ | ||
| 289 | period = MAX (suffix, needle_len - suffix) + 1; | ||
| 290 | j = 0; | ||
| 291 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) | ||
| 292 | { | ||
| 293 | /* Scan for matches in right half. */ | ||
| 294 | i = suffix; | ||
| 295 | while (i < needle_len && (CANON_ELEMENT (needle[i]) | ||
| 296 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 297 | ++i; | ||
| 298 | if (needle_len <= i) | ||
| 299 | { | ||
| 300 | /* Scan for matches in left half. */ | ||
| 301 | i = suffix - 1; | ||
| 302 | while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) | ||
| 303 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 304 | --i; | ||
| 305 | if (i == SIZE_MAX) | ||
| 306 | return (RETURN_TYPE) (haystack + j); | ||
| 307 | j += period; | ||
| 308 | } | ||
| 309 | else | ||
| 310 | j += i - suffix + 1; | ||
| 311 | } | ||
| 312 | } | ||
| 313 | return NULL; | ||
| 314 | } | ||
| 315 | |||
| 316 | /* Return the first location of non-empty NEEDLE within HAYSTACK, or | ||
| 317 | NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This | ||
| 318 | method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. | ||
| 319 | Performance is guaranteed to be linear, with an initialization cost | ||
| 320 | of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. | ||
| 321 | |||
| 322 | If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at | ||
| 323 | most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, | ||
| 324 | and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. | ||
| 325 | If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * | ||
| 326 | HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and | ||
| 327 | sublinear performance is not possible. */ | ||
| 328 | static RETURN_TYPE | ||
| 329 | two_way_long_needle (const unsigned char *haystack, size_t haystack_len, | ||
| 330 | const unsigned char *needle, size_t needle_len) | ||
| 331 | { | ||
| 332 | size_t i; /* Index into current byte of NEEDLE. */ | ||
| 333 | size_t j; /* Index into current window of HAYSTACK. */ | ||
| 334 | size_t period; /* The period of the right half of needle. */ | ||
| 335 | size_t suffix; /* The index of the right half of needle. */ | ||
| 336 | size_t shift_table[1U << CHAR_BIT]; /* See below. */ | ||
| 337 | |||
| 338 | /* Factor the needle into two halves, such that the left half is | ||
| 339 | smaller than the global period, and the right half is | ||
| 340 | periodic (with a period as large as NEEDLE_LEN - suffix). */ | ||
| 341 | suffix = critical_factorization (needle, needle_len, &period); | ||
| 342 | |||
| 343 | /* Populate shift_table. For each possible byte value c, | ||
| 344 | shift_table[c] is the distance from the last occurrence of c to | ||
| 345 | the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. | ||
| 346 | shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ | ||
| 347 | for (i = 0; i < 1U << CHAR_BIT; i++) | ||
| 348 | shift_table[i] = needle_len; | ||
| 349 | for (i = 0; i < needle_len; i++) | ||
| 350 | shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; | ||
| 351 | |||
| 352 | /* Perform the search. Each iteration compares the right half | ||
| 353 | first. */ | ||
| 354 | if (CMP_FUNC (needle, needle + period, suffix) == 0) | ||
| 355 | { | ||
| 356 | /* Entire needle is periodic; a mismatch in the left half can | ||
| 357 | only advance by the period, so use memory to avoid rescanning | ||
| 358 | known occurrences of the period in the right half. */ | ||
| 359 | size_t memory = 0; | ||
| 360 | size_t shift; | ||
| 361 | j = 0; | ||
| 362 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) | ||
| 363 | { | ||
| 364 | /* Check the last byte first; if it does not match, then | ||
| 365 | shift to the next possible match location. */ | ||
| 366 | shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; | ||
| 367 | if (0 < shift) | ||
| 368 | { | ||
| 369 | if (memory && shift < period) | ||
| 370 | { | ||
| 371 | /* Since needle is periodic, but the last period has | ||
| 372 | a byte out of place, there can be no match until | ||
| 373 | after the mismatch. */ | ||
| 374 | shift = needle_len - period; | ||
| 375 | } | ||
| 376 | memory = 0; | ||
| 377 | j += shift; | ||
| 378 | continue; | ||
| 379 | } | ||
| 380 | /* Scan for matches in right half. The last byte has | ||
| 381 | already been matched, by virtue of the shift table. */ | ||
| 382 | i = MAX (suffix, memory); | ||
| 383 | while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) | ||
| 384 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 385 | ++i; | ||
| 386 | if (needle_len - 1 <= i) | ||
| 387 | { | ||
| 388 | /* Scan for matches in left half. */ | ||
| 389 | i = suffix - 1; | ||
| 390 | while (memory < i + 1 && (CANON_ELEMENT (needle[i]) | ||
| 391 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 392 | --i; | ||
| 393 | if (i + 1 < memory + 1) | ||
| 394 | return (RETURN_TYPE) (haystack + j); | ||
| 395 | /* No match, so remember how many repetitions of period | ||
| 396 | on the right half were scanned. */ | ||
| 397 | j += period; | ||
| 398 | memory = needle_len - period; | ||
| 399 | } | ||
| 400 | else | ||
| 401 | { | ||
| 402 | j += i - suffix + 1; | ||
| 403 | memory = 0; | ||
| 404 | } | ||
| 405 | } | ||
| 406 | } | ||
| 407 | else | ||
| 408 | { | ||
| 409 | /* The two halves of needle are distinct; no extra memory is | ||
| 410 | required, and any mismatch results in a maximal shift. */ | ||
| 411 | size_t shift; | ||
| 412 | period = MAX (suffix, needle_len - suffix) + 1; | ||
| 413 | j = 0; | ||
| 414 | while (AVAILABLE (haystack, haystack_len, j, needle_len)) | ||
| 415 | { | ||
| 416 | /* Check the last byte first; if it does not match, then | ||
| 417 | shift to the next possible match location. */ | ||
| 418 | shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; | ||
| 419 | if (0 < shift) | ||
| 420 | { | ||
| 421 | j += shift; | ||
| 422 | continue; | ||
| 423 | } | ||
| 424 | /* Scan for matches in right half. The last byte has | ||
| 425 | already been matched, by virtue of the shift table. */ | ||
| 426 | i = suffix; | ||
| 427 | while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) | ||
| 428 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 429 | ++i; | ||
| 430 | if (needle_len - 1 <= i) | ||
| 431 | { | ||
| 432 | /* Scan for matches in left half. */ | ||
| 433 | i = suffix - 1; | ||
| 434 | while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) | ||
| 435 | == CANON_ELEMENT (haystack[i + j]))) | ||
| 436 | --i; | ||
| 437 | if (i == SIZE_MAX) | ||
| 438 | return (RETURN_TYPE) (haystack + j); | ||
| 439 | j += period; | ||
| 440 | } | ||
| 441 | else | ||
| 442 | j += i - suffix + 1; | ||
| 443 | } | ||
| 444 | } | ||
| 445 | return NULL; | ||
| 446 | } | ||
| 447 | |||
| 448 | #undef AVAILABLE | ||
| 449 | #undef CANON_ELEMENT | ||
| 450 | #undef CMP_FUNC | ||
| 451 | #undef MAX | ||
| 452 | #undef RETURN_TYPE | ||
diff --git a/lib/strftime.h b/lib/strftime.h index af73767f5e7..e4a720b016b 100644 --- a/lib/strftime.h +++ b/lib/strftime.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* declarations for strftime.c | 1 | /* declarations for strftime.c |
| 2 | 2 | ||
| 3 | Copyright (C) 2002, 2004, 2008-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2002, 2004, 2008-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/string.in.h b/lib/string.in.h index 29f4ba6b1e1..4a9292f74ad 100644 --- a/lib/string.in.h +++ b/lib/string.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A GNU-like <string.h>. | 1 | /* A GNU-like <string.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 1995-1996, 2001-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1995-1996, 2001-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/strtoimax.c b/lib/strtoimax.c index 69e3a99ce17..87b080c4f35 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Convert string representation of a number into an intmax_t value. | 1 | /* Convert string representation of a number into an intmax_t value. |
| 2 | 2 | ||
| 3 | Copyright (C) 1999, 2001-2004, 2006, 2009-2018 Free Software Foundation, | 3 | Copyright (C) 1999, 2001-2004, 2006, 2009-2019 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
diff --git a/lib/strtol.c b/lib/strtol.c index f6f5c3268de..1d920aff544 100644 --- a/lib/strtol.c +++ b/lib/strtol.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Convert string representation of a number into an integer value. | 1 | /* Convert string representation of a number into an integer value. |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2018 Free Software | 3 | Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | NOTE: The canonical source of this file is maintained with the GNU C | 6 | NOTE: The canonical source of this file is maintained with the GNU C |
diff --git a/lib/strtoll.c b/lib/strtoll.c index 8aa10f48f7b..038362a308b 100644 --- a/lib/strtoll.c +++ b/lib/strtoll.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Function to parse a 'long long int' from text. | 1 | /* Function to parse a 'long long int' from text. |
| 2 | Copyright (C) 1995-1997, 1999, 2001, 2009-2018 Free Software Foundation, | 2 | Copyright (C) 1995-1997, 1999, 2001, 2009-2019 Free Software Foundation, |
| 3 | Inc. | 3 | Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
diff --git a/lib/symlink.c b/lib/symlink.c index c1c4b405cea..16432ee3275 100644 --- a/lib/symlink.c +++ b/lib/symlink.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Stub for symlink(). | 1 | /* Stub for symlink(). |
| 2 | Copyright (C) 2009-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index 154e570f023..4cf7cfc8e18 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Substitute for <sys/select.h>. | 1 | /* Substitute for <sys/select.h>. |
| 2 | Copyright (C) 2007-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2019 Free Software Foundation, Inc. |
| 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 |
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 6ae6ac5fbdc..9ddd1a8d004 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Provide a more complete sys/stat.h header file. | 1 | /* Provide a more complete sys/stat.h header file. |
| 2 | Copyright (C) 2005-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2019 Free Software Foundation, Inc. |
| 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 |
| @@ -54,9 +54,16 @@ | |||
| 54 | 54 | ||
| 55 | /* The definition of _GL_WARN_ON_USE is copied here. */ | 55 | /* The definition of _GL_WARN_ON_USE is copied here. */ |
| 56 | 56 | ||
| 57 | /* Before doing "#define mknod rpl_mknod" below, we need to include all | ||
| 58 | headers that may declare mknod(). OS/2 kLIBC declares mknod() in | ||
| 59 | <unistd.h>, not in <sys/stat.h>. */ | ||
| 60 | #ifdef __KLIBC__ | ||
| 61 | # include <unistd.h> | ||
| 62 | #endif | ||
| 63 | |||
| 57 | /* Before doing "#define mkdir rpl_mkdir" below, we need to include all | 64 | /* Before doing "#define mkdir rpl_mkdir" below, we need to include all |
| 58 | headers that may declare mkdir(). Native Windows platforms declare mkdir | 65 | headers that may declare mkdir(). Native Windows platforms declare mkdir |
| 59 | in <io.h> and/or <direct.h>, not in <unistd.h>. */ | 66 | in <io.h> and/or <direct.h>, not in <sys/stat.h>. */ |
| 60 | #if defined _WIN32 && ! defined __CYGWIN__ | 67 | #if defined _WIN32 && ! defined __CYGWIN__ |
| 61 | # include <io.h> /* mingw32, mingw64 */ | 68 | # include <io.h> /* mingw32, mingw64 */ |
| 62 | # include <direct.h> /* mingw64, MSVC 9 */ | 69 | # include <direct.h> /* mingw64, MSVC 9 */ |
diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h index b4a0e49c508..539768889d0 100644 --- a/lib/sys_time.in.h +++ b/lib/sys_time.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Provide a more complete sys/time.h. | 1 | /* Provide a more complete sys/time.h. |
| 2 | 2 | ||
| 3 | Copyright (C) 2007-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2007-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h index 7f8c1c42117..237e2068cf8 100644 --- a/lib/sys_types.in.h +++ b/lib/sys_types.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Provide a more complete sys/types.h. | 1 | /* Provide a more complete sys/types.h. |
| 2 | 2 | ||
| 3 | Copyright (C) 2011-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/tempname.c b/lib/tempname.c index da81263b8c0..be62ed9513c 100644 --- a/lib/tempname.c +++ b/lib/tempname.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* tempname.c - generate the name of a temporary file. | 1 | /* tempname.c - generate the name of a temporary file. |
| 2 | 2 | ||
| 3 | Copyright (C) 1991-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1991-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/tempname.h b/lib/tempname.h index 4020c734c57..fb203d3a10f 100644 --- a/lib/tempname.h +++ b/lib/tempname.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Create a temporary file or directory. | 1 | /* Create a temporary file or directory. |
| 2 | 2 | ||
| 3 | Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/time-internal.h b/lib/time-internal.h index 3a836239120..57f2e7890b2 100644 --- a/lib/time-internal.h +++ b/lib/time-internal.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Time internal interface | 1 | /* Time internal interface |
| 2 | 2 | ||
| 3 | Copyright 2015-2018 Free Software Foundation, Inc. | 3 | Copyright 2015-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/time.in.h b/lib/time.in.h index 3128f44a6f7..dd3b21273c9 100644 --- a/lib/time.in.h +++ b/lib/time.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A more-standard <time.h>. | 1 | /* A more-standard <time.h>. |
| 2 | 2 | ||
| 3 | Copyright (C) 2007-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2007-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/time_r.c b/lib/time_r.c index 302978077d0..a701ccc5b82 100644 --- a/lib/time_r.c +++ b/lib/time_r.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Reentrant time functions like localtime_r. | 1 | /* Reentrant time functions like localtime_r. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003, 2006-2007, 2010-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2003, 2006-2007, 2010-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/time_rz.c b/lib/time_rz.c index 5293c7cf8dc..42ae3d3649f 100644 --- a/lib/time_rz.c +++ b/lib/time_rz.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Time zone functions such as tzalloc and localtime_rz | 1 | /* Time zone functions such as tzalloc and localtime_rz |
| 2 | 2 | ||
| 3 | Copyright 2015-2018 Free Software Foundation, Inc. | 3 | Copyright 2015-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/timegm.c b/lib/timegm.c index 9d9ab111251..2ca57444d43 100644 --- a/lib/timegm.c +++ b/lib/timegm.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Convert UTC calendar time to simple time. Like mktime but assumes UTC. | 1 | /* Convert UTC calendar time to simple time. Like mktime but assumes UTC. |
| 2 | 2 | ||
| 3 | Copyright (C) 1994-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1994-2019 Free Software Foundation, Inc. |
| 4 | This file is part of the GNU C Library. | 4 | This file is part of the GNU C Library. |
| 5 | 5 | ||
| 6 | The GNU C Library is free software; you can redistribute it and/or | 6 | The GNU C Library is free software; you can redistribute it and/or |
diff --git a/lib/timespec-add.c b/lib/timespec-add.c index 1913b979edd..e0a9f12e14c 100644 --- a/lib/timespec-add.c +++ b/lib/timespec-add.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Add two struct timespec values. | 1 | /* Add two struct timespec values. |
| 2 | 2 | ||
| 3 | Copyright (C) 2011-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/timespec-sub.c b/lib/timespec-sub.c index 9eac36e51ac..48434e81506 100644 --- a/lib/timespec-sub.c +++ b/lib/timespec-sub.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Subtract two struct timespec values. | 1 | /* Subtract two struct timespec values. |
| 2 | 2 | ||
| 3 | Copyright (C) 2011-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/timespec.h b/lib/timespec.h index cc49668f42a..26f1bc1a4c7 100644 --- a/lib/timespec.h +++ b/lib/timespec.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* timespec -- System time interface | 1 | /* timespec -- System time interface |
| 2 | 2 | ||
| 3 | Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2018 Free Software | 3 | Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2019 Free Software |
| 4 | Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* uint64_t-like operations that work even on hosts lacking uint64_t | 1 | /* uint64_t-like operations that work even on hosts lacking uint64_t |
| 2 | 2 | ||
| 3 | Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 66f254d60f5..7778d25dc7e 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Substitute for and wrapper around <unistd.h>. | 1 | /* Substitute for and wrapper around <unistd.h>. |
| 2 | Copyright (C) 2003-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2003-2019 Free Software Foundation, Inc. |
| 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 |
| @@ -68,9 +68,11 @@ | |||
| 68 | # include <stdio.h> | 68 | # include <stdio.h> |
| 69 | #endif | 69 | #endif |
| 70 | 70 | ||
| 71 | /* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */ | 71 | /* Cygwin 1.7.1 and Android 4.3 declare unlinkat in <fcntl.h>, not in |
| 72 | <unistd.h>. */ | ||
| 72 | /* But avoid namespace pollution on glibc systems. */ | 73 | /* But avoid namespace pollution on glibc systems. */ |
| 73 | #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ | 74 | #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) \ |
| 75 | && (defined __CYGWIN__ || defined __ANDROID__) \ | ||
| 74 | && ! defined __GLIBC__ | 76 | && ! defined __GLIBC__ |
| 75 | # include <fcntl.h> | 77 | # include <fcntl.h> |
| 76 | #endif | 78 | #endif |
| @@ -113,6 +115,13 @@ | |||
| 113 | # include <netdb.h> | 115 | # include <netdb.h> |
| 114 | #endif | 116 | #endif |
| 115 | 117 | ||
| 118 | /* Android 4.3 declares fchownat in <sys/stat.h>, not in <unistd.h>. */ | ||
| 119 | /* But avoid namespace pollution on glibc systems. */ | ||
| 120 | #if (@GNULIB_FCHOWNAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ | ||
| 121 | && !defined __GLIBC__ | ||
| 122 | # include <sys/stat.h> | ||
| 123 | #endif | ||
| 124 | |||
| 116 | /* MSVC defines off_t in <sys/types.h>. | 125 | /* MSVC defines off_t in <sys/types.h>. |
| 117 | May also define off_t to a 64-bit type on native Windows. */ | 126 | May also define off_t to a 64-bit type on native Windows. */ |
| 118 | #if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@ | 127 | #if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@ |
diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h index e3f0fcfed4a..ee1c06268fe 100644 --- a/lib/unlocked-io.h +++ b/lib/unlocked-io.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Prefer faster, non-thread-safe stdio functions if available. | 1 | /* Prefer faster, non-thread-safe stdio functions if available. |
| 2 | 2 | ||
| 3 | Copyright (C) 2001-2004, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2001-2004, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/lib/utimens.c b/lib/utimens.c index f6c4fe34c7c..c9b65ef4c20 100644 --- a/lib/utimens.c +++ b/lib/utimens.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Set file access and modification times. | 1 | /* Set file access and modification times. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2003-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify it | 5 | This program is free software: you can redistribute it and/or modify it |
| 6 | under the terms of the GNU General Public License as published by the | 6 | under the terms of the GNU General Public License as published by the |
| @@ -288,8 +288,8 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2]) | |||
| 288 | 288 | ||
| 289 | #ifdef USE_SETFILETIME | 289 | #ifdef USE_SETFILETIME |
| 290 | /* On native Windows, use SetFileTime(). See | 290 | /* On native Windows, use SetFileTime(). See |
| 291 | <https://msdn.microsoft.com/en-us/library/ms724933.aspx> | 291 | <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-setfiletime> |
| 292 | <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */ | 292 | <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */ |
| 293 | if (0 <= fd) | 293 | if (0 <= fd) |
| 294 | { | 294 | { |
| 295 | HANDLE handle; | 295 | HANDLE handle; |
| @@ -307,10 +307,10 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2]) | |||
| 307 | if (ts == NULL || ts[0].tv_nsec == UTIME_NOW || ts[1].tv_nsec == UTIME_NOW) | 307 | if (ts == NULL || ts[0].tv_nsec == UTIME_NOW || ts[1].tv_nsec == UTIME_NOW) |
| 308 | { | 308 | { |
| 309 | /* GetSystemTimeAsFileTime | 309 | /* GetSystemTimeAsFileTime |
| 310 | <https://msdn.microsoft.com/en-us/library/ms724397.aspx>. | 310 | <https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime>. |
| 311 | It would be overkill to use | 311 | It would be overkill to use |
| 312 | GetSystemTimePreciseAsFileTime | 312 | GetSystemTimePreciseAsFileTime |
| 313 | <https://msdn.microsoft.com/en-us/library/hh706895.aspx>. */ | 313 | <https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime>. */ |
| 314 | GetSystemTimeAsFileTime (¤t_time); | 314 | GetSystemTimeAsFileTime (¤t_time); |
| 315 | } | 315 | } |
| 316 | 316 | ||
diff --git a/lib/utimens.h b/lib/utimens.h index a24e62cb174..b1740960361 100644 --- a/lib/utimens.h +++ b/lib/utimens.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Set file access and modification times. | 1 | /* Set file access and modification times. |
| 2 | 2 | ||
| 3 | Copyright 2012-2018 Free Software Foundation, Inc. | 3 | Copyright 2012-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify it | 5 | This program is free software: you can redistribute it and/or modify it |
| 6 | under the terms of the GNU General Public License as published by the | 6 | under the terms of the GNU General Public License as published by the |
diff --git a/lib/verify.h b/lib/verify.h index 3b57ddee0ac..6930645a350 100644 --- a/lib/verify.h +++ b/lib/verify.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Compile-time assert-like macros. | 1 | /* Compile-time assert-like macros. |
| 2 | 2 | ||
| 3 | Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -26,7 +26,7 @@ | |||
| 26 | here generates easier-to-read diagnostics when verify (R) fails. | 26 | here generates easier-to-read diagnostics when verify (R) fails. |
| 27 | 27 | ||
| 28 | Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. | 28 | Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. |
| 29 | This will likely be supported by future GCC versions, in C++ mode. | 29 | This is supported by GCC 6.1.0 and later, in C++ mode. |
| 30 | 30 | ||
| 31 | Use this only with GCC. If we were willing to slow 'configure' | 31 | Use this only with GCC. If we were willing to slow 'configure' |
| 32 | down we could also use it with other compilers, but since this | 32 | down we could also use it with other compilers, but since this |
| @@ -36,9 +36,7 @@ | |||
| 36 | && !defined __cplusplus) | 36 | && !defined __cplusplus) |
| 37 | # define _GL_HAVE__STATIC_ASSERT 1 | 37 | # define _GL_HAVE__STATIC_ASSERT 1 |
| 38 | #endif | 38 | #endif |
| 39 | /* The condition (99 < __GNUC__) is temporary, until we know about the | 39 | #if (6 <= __GNUC__) && defined __cplusplus |
| 40 | first G++ release that supports static_assert. */ | ||
| 41 | #if (99 < __GNUC__) && defined __cplusplus | ||
| 42 | # define _GL_HAVE_STATIC_ASSERT 1 | 40 | # define _GL_HAVE_STATIC_ASSERT 1 |
| 43 | #endif | 41 | #endif |
| 44 | 42 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* vla.h - variable length arrays | 1 | /* vla.h - variable length arrays |
| 2 | 2 | ||
| 3 | Copyright 2014-2018 Free Software Foundation, Inc. | 3 | Copyright 2014-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -17,6 +17,20 @@ | |||
| 17 | 17 | ||
| 18 | Written by Paul Eggert. */ | 18 | Written by Paul Eggert. */ |
| 19 | 19 | ||
| 20 | /* The VLA_ELEMS macro does not allocate variable-length arrays (VLAs), | ||
| 21 | so it does not have the security or performance issues commonly | ||
| 22 | associated with VLAs. VLA_ELEMS is for exploiting a C11 feature | ||
| 23 | where a function can start like this: | ||
| 24 | |||
| 25 | double scan_array (int n, double v[static n]) | ||
| 26 | |||
| 27 | to require a caller to pass a vector V with at least N elements; | ||
| 28 | this allows better static checking and performance in some cases. | ||
| 29 | In C11 this feature means that V is a VLA, so the feature is | ||
| 30 | supported only if __STDC_NO_VLA__ is defined, and for compatibility | ||
| 31 | to platforms that do not support VLAs, VLA_ELEMS (n) expands to | ||
| 32 | nothing when __STDC_NO_VLA__ is not defined. */ | ||
| 33 | |||
| 20 | /* A function's argument must point to an array with at least N elements. | 34 | /* A function's argument must point to an array with at least N elements. |
| 21 | Example: 'int main (int argc, char *argv[VLA_ELEMS (argc)]);'. */ | 35 | Example: 'int main (int argc, char *argv[VLA_ELEMS (argc)]);'. */ |
| 22 | 36 | ||
| @@ -25,3 +39,15 @@ | |||
| 25 | #else | 39 | #else |
| 26 | # define VLA_ELEMS(n) static n | 40 | # define VLA_ELEMS(n) static n |
| 27 | #endif | 41 | #endif |
| 42 | |||
| 43 | /* Although C99 requires support for variable-length arrays (VLAs), | ||
| 44 | some C compilers never supported VLAs and VLAs are optional in C11. | ||
| 45 | VLAs are controversial because their allocation may be unintended | ||
| 46 | or awkward to support, and large VLAs might cause security or | ||
| 47 | performance problems. GCC can diagnose the use of VLAs via the | ||
| 48 | -Wvla and -Wvla-larger-than warnings options, and defining the | ||
| 49 | macro GNULIB_NO_VLA disables the allocation of VLAs in Gnulib code. | ||
| 50 | |||
| 51 | The VLA_ELEMS macro is unaffected by GNULIB_NO_VLA, since it does | ||
| 52 | not allocate VLAs. Programs that use VLA_ELEMS should be compiled | ||
| 53 | with 'gcc -Wvla-larger-than' instead of with 'gcc -Wvla'. */ | ||
diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h index 72d67cc2348..7d11a156911 100644 --- a/lib/warn-on-use.h +++ b/lib/warn-on-use.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A C macro for emitting warnings if a function is used. | 1 | /* A C macro for emitting warnings if a function is used. |
| 2 | Copyright (C) 2010-2018 Free Software Foundation, Inc. | 2 | Copyright (C) 2010-2019 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify it | 4 | This program is free software: you can redistribute it and/or modify it |
| 5 | under the terms of the GNU General Public License as published | 5 | under the terms of the GNU General Public License as published |
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h index 3426e10f4d2..e3068c83c48 100644 --- a/lib/xalloc-oversized.h +++ b/lib/xalloc-oversized.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* xalloc-oversized.h -- memory allocation size checking | 1 | /* xalloc-oversized.h -- memory allocation size checking |
| 2 | 2 | ||
| 3 | Copyright (C) 1990-2000, 2003-2004, 2006-2018 Free Software Foundation, Inc. | 3 | Copyright (C) 1990-2000, 2003-2004, 2006-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |