summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* crypto/md4: Use 'restrict'.Bruno Haible2020-02-233-3/+9
| | | | | * lib/md4.h (md4_finish_ctx, md4_read_ctx, md4_buffer): Use 'restrict'. * modules/crypto/md4 (configure.ac): Require AC_C_RESTRICT.
* crypto/md2: Use 'restrict'.Bruno Haible2020-02-233-3/+9
| | | | | * lib/md2.h (md2_finish_ctx, md2_read_ctx, md2_buffer): Use 'restrict'. * modules/crypto/md2 (configure.ac): Require AC_C_RESTRICT.
* crypto/rijndael: Use 'restrict'.Bruno Haible2020-02-233-4/+10
| | | | | | * lib/rijndael-api-fst.h (rijndaelBlockEncrypt, rijndaelPadEncrypt, rijndaelBlockDecrypt, rijndaelPadDecrypt): Use 'restrict'. * modules/crypto/rijndael (configure.ac): Require AC_C_RESTRICT.
* crypto/arctwo: Use 'restrict'.Bruno Haible2020-02-233-2/+7
| | | | | * lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'. * modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT.
* crypto/arcfour: Use 'restrict'.Bruno Haible2020-02-233-1/+6
| | | | | * lib/arcfour.h (arcfour_stream): Use 'restrict'. * modules/crypto/arcfour (configure.ac): Require AC_C_RESTRICT.
* careadlinkat: Use 'restrict'.Bruno Haible2020-02-234-1/+8
| | | | | | * lib/careadlinkat.h (careadlinkat): Use 'restrict'. * modules/careadlinkat (configure.ac): Require AC_C_RESTRICT. * modules/relocatable-prog-wrapper (configure.ac): Likewise.
* regex-quote: Use 'restrict'.Bruno Haible2020-02-233-1/+6
| | | | | * lib/regex-quote.h (regex_quote_copy): Use 'restrict'. * modules/regex-quote (configure.ac): Require AC_C_RESTRICT.
* system-quote: Use 'restrict'.Bruno Haible2020-02-233-1/+6
| | | | | * lib/system-quote.h (system_quote_copy): Use 'restrict'. * modules/system-quote (configure.ac): Require AC_C_RESTRICT.
* sh-quote: Use 'restrict'.Bruno Haible2020-02-233-1/+6
| | | | | * lib/sh-quote.h (shell_quote_copy): Use 'restrict'. * modules/sh-quote (configure.ac): Require AC_C_RESTRICT.
* quotearg: Use 'restrict'.Bruno Haible2020-02-233-2/+7
| | | | | * lib/quotearg.h (quotearg_buffer): Use 'restrict'. * m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT.
* parse-datetime: Use 'restrict'.Bruno Haible2020-02-233-3/+11
| | | | | | * lib/parse-datetime.h (parse_datetime, parse_datetime2): Use 'restrict'. * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Require AC_C_RESTRICT.
* nstrftime: Use 'restrict'.Bruno Haible2020-02-233-2/+8
| | | | | * lib/strftime.h (nstrftime): Use 'restrict'. * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Require AC_C_RESTRICT.
* mbstok_r: Use 'restrict'.Bruno Haible2020-02-232-1/+5
| | | | * lib/string.in.h (mbstok_r): Use 'restrict'.
* xmemcoll: Use 'restrict'.Bruno Haible2020-02-233-1/+6
| | | | | * lib/xmemcoll.h (xmemcoll): Use 'restrict'. * modules/xmemcoll (configure.ac): Require AC_C_RESTRICT.
* memcoll: Use 'restrict'.Bruno Haible2020-02-233-3/+11
| | | | | * lib/memcoll.h (memcoll): Use 'restrict'. * m4/memcoll.m4 (gl_MEMCOLL): Require AC_C_RESTRICT.
* vasnprintf: Use 'restrict'.Bruno Haible2020-02-233-2/+9
| | | | | * lib/vasnprintf.h (asnprintf, vasnprintf): Use 'restrict'. * modules/vasnprintf (configure.ac): Require AC_C_RESTRICT.
* c-vasnprintf: Use 'restrict'.Bruno Haible2020-02-233-1/+7
| | | | | * lib/c-vasnprintf.h (c_vasnprintf): Use 'restrict'. * modules/c-vasnprintf (configure.ac): Require AC_C_RESTRICT.
* c-vsnprintf: Use 'restrict'.Bruno Haible2020-02-233-1/+7
| | | | | * lib/c-vsnprintf.h (c_vsnprintf): Use 'restrict'. * modules/c-vsnprintf (configure.ac): Require AC_C_RESTRICT.
* c-snprintf: Use 'restrict'.Bruno Haible2020-02-233-1/+7
| | | | | * lib/c-snprintf.h (c_snprintf): Use 'restrict'. * modules/c-snprintf (configure.ac): Require AC_C_RESTRICT.
* astrxfrm: Use 'restrict'.Bruno Haible2020-02-233-1/+7
| | | | | * lib/astrxfrm.h (astrxfrm): Use 'restrict'. * modules/astrxfrm (configure.ac): Require AC_C_RESTRICT.
* amemxfrm: Use 'restrict'.Bruno Haible2020-02-233-1/+9
| | | | | * lib/amemxfrm.h (amemxfrm): Use 'restrict'. * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT.
* fchmodat, lchmod: simplifyPaul Eggert2020-02-238-125/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears that we may have overengineered lchmod and fchmodat, in that the code was prepared for some hypothetical platforms but was so complicated that it was hard to understand. I attempted to improve the situation by simplifying the code when this simplification should not hurt on real platforms; we can re-add complexity later to port to platforms I didn’t know about. * lib/fchmodat.c (fchmodat): * lib/lchmod.c (lchmod): Put the ‘defined __linux__ || defined __ANDROID__’ #ifdef only around the /proc code that needs it. * lib/fchmodat.c (fchmodat): Coalese calls to orig_fchmodat. * lib/lchmod.c (__need_system_sys_stat_h): Omit; no longer needed. Do not include <config.h> twice. (orig_lchmod) [HAVE_LCHMOD]: Remove, since we need not wrap lchmod on any known hosts. (lchmod): Do not defer to fchmodat, so that the lchmod module need not depend on the fchmodat module (which is a circular dependency). Do not use openat, since ‘open’ suffices. Coalesce calls to lchmod/chmod. * lib/lchmod.c, lib/sys_stat.in.h (lchmod): * m4/sys_stat_h.m4 (REPLACE_FSTAT): * modules/lchmod (Depends-on, configure.ac): * modules/sys_stat (Depends-on): Do not worry about replacing lchmod, since that shouldn’t happen. * m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not check for fchmodat. Do not worry about whether lchmod works on non-symlinks, since every known lchmod works on non-symlinks. * modules/lchmod (Depends-on): Remove circular dependency on fchmodat.
* lchmod: Fix link error on Solaris 10 (regression from 2020-02-16).Bruno Haible2020-02-232-11/+15
| | | | | * lib/lchmod.c (lchmod): Use the code with lstat and chmod also when NEED_LCHMOD_NONSYMLINK_FIX is not defined.
* Use 'restrict' in all POSIX function declarations.Bruno Haible2020-02-2228-358/+691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/iconv.in.h (iconv): Use 'restrict'. * lib/inttypes.in.h (strtoimax, strtoumax): Likewise. * lib/monetary.in.h (strfmon_l): Likewise. * lib/pthread.in.h (pthread_create, pthread_mutex_init, pthread_mutexattr_gettype, pthread_mutexattr_getrobust, pthread_mutex_timedlock, pthread_rwlock_init, pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock, pthread_cond_init, pthread_cond_wait, pthread_cond_timedwait): Likewise. * lib/search.in.h (tdelete): Likewise. * lib/signal.in.h (pthread_sigmask, sigprocmask): Likewise. * lib/stdio.in.h (dprintf, fgets, fopen, fprintf, fputs, fread, freopen, fscanf, fwrite, getdelim, getline, printf, scanf, snprintf, sprintf, vdprintf, vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf): Likewise. * lib/stdlib.in.h (mbtowc, realpath, strtod, strtold, strtoll, strtoull): Likewise. * lib/string.in.h (strncat): Likewise. * lib/sys_socket.in.h (accept, getpeername, getsockname, getsockopt, recvfrom): Likewise. * lib/sys_stat.in.h (fstatat, lstat, stat): Likewise. * lib/time.in.h (strftime): Likewise. * lib/unistd.in.h (readlink, readlinkat): Likewise. * lib/wchar.in.h (mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs, wcrtomb, wcsrtombs, wcsnrtombs, wmemcpy, wcscpy, wcpcpy, wcsncpy, wcpncpy, wcscat, wcsncat, wcsxfrm, wcsstr, wcstok, wcsftime): Likewise. * m4/iconv_h.m4 (gl_ICONV_H): Require AC_C_RESTRICT. * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Likewise. * m4/monetary_h.m4 (gl_MONETARY_H): Likewise. * m4/search_h.m4 (gl_SEARCH_H): Likewise. * m4/signal_h.m4 (gl_SIGNAL_H): Likewise. * m4/stdio_h.m4 (gl_STDIO_H): Likewise. * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise. * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise. * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H): Likewise. * m4/wchar_h.m4 (gl_WCHAR_H): Likewise. * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Make consistent with the other *_h.m4 files. * m4/time_h.m4 (gl_HEADER_TIME_H): Likewise.
* Update NEWS.Bruno Haible2020-02-222-0/+15
| | | | * NEWS: Mention the last change.
* chmodat, chownat: new modulesPaul Eggert2020-02-2210-21/+122
| | | | | | | | | | | | | | | | | | | | | | | These are split from fchmodat, fchownat. GNU Emacs needs the POSIX-specified fchmodat, but not the gnulib-specified chmodat and lchmodat. Split the latter two into a new module chmodat. Similarly for fchownat. This the same basic idea for why statat was split from fstatat on 2013-01-23. * lib/chmodat.c, lib/openat.h (CHMODAT_INLINE): Rename from FCHMODAT_INLINE. All uses changed. * lib/chownat.c, lib/openat.h (CHOWNAT_INLINE): Rename from FCHOWNAT_INLINE. All uses changed. * lib/openat.h: (chownat, lchownat): Define if GNULIB_CHOWNAT, not GNULIB_FCHOWNAT. (chmodat, lchmodat): Define if GNULIB_CHMODAT, not GNULIB_FCHMODAT. * modules/chmodat, modules/chownat, tests/test-chownat.c: New files. * modules/fchmodat (Files:): Remove lib/fchmodat.c. (configure.ac): Remove fchmodat module indicator. (Makefile.am): Omit chmodat.c. (Maintainer): Add self. * modules/fchownat: Similarly, but for chown. * tests/test-fchownat.c (BASE): Don't define if already defined. (do_chown, do_lchown) [!TEST_CHOWNAT]: Test fchownat instead.
* users.txt: Add groff.Bruno Haible2020-02-222-0/+7
| | | | | | Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is>. * users.txt: Add groff.
* Update gnulib-tool.py.TODO.Bruno Haible2020-02-221-0/+15
|
* gnulib-tool: Ensure copied files are writable.Bruno Haible2020-02-222-0/+23
| | | | | | | | | Reported by Benno Fünfstück <benno.fuenfstueck@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00101.html>. * gnulib-tool (func_ensure_writable): New function. (func_ln_s, func_hardlink, func_lookup_file, func_import, func_create_testdir, copy-file): Invoke it after copying a file.
* users.txt: Update.Bruno Haible2020-02-222-76/+84
| | | | | | * users.txt: Update URLs to projects that have moved or switched to git. Use canonical host names. Prefer gitweb over cgit. Prefer the tree view over the summary view. Add gawk.
* largefile: remove _DARWIN_USE_64_BIT_INODEPaul Eggert2020-02-212-3/+9
| | | | | | | | | | It’s not needed in currently-supported macOS versions, and was problematic anyway in MacOS X 10.5 which was the only version that could use it. Problem reported by Peter Eisentraut in: https://lists.gnu.org/r/bug-autoconf/2020-02/msg00004.html * m4/largefile.m4 (AC_SYS_LARGEFILE): Don’t define _DARWIN_USE_64_BIT_INODE. This syncs with Autoconf master.
* Add ‘extern "C"’ to count-one-bits.h etc.Paul Eggert2020-02-214-0/+33
| | | | | | | | This ports these .h files to C++. Problem reported by Simon Marchi in: https://lists.gnu.org/r/bug-gnulib/2020-02/msg00110.html * lib/count-leading-zeros.h, lib/count-one-bits.h: * lib/count-trailing-zeros.h: Add ‘extern "C"’.
* users.txt: update cmogstored URLEric Wong2020-02-191-1/+1
| | | | | bogomips.org is expiring and .org is unlikely to be affordable down the line, so it's on yhbt.net for now.
* uninorm/decompose-internal: Avoid "no previous prototype" warning.Bruno Haible2020-02-193-1/+18
| | | | | | | | | Reported by Tim Rühsen <tim.ruehsen@gmx.de> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00105.html>. * lib/array-mergesort.h: Accept an optional macro definition STATIC_FROMTO. * lib/uninorm/decompose-internal.c (STATIC_FROMTO): New macro.
* fchmodat: Make more future-proof.Bruno Haible2020-02-164-9/+48
| | | | | | | | | | * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Define NEED_FCHMODAT_NONSYMLINK_FIX. (gl_PREREQ_FCHMODAT): New macro. * lib/fchmodat.c (fchmodat): Test NEED_FCHMODAT_NONSYMLINK_FIX. Access /proc only on Linux. Return EOPNOTSUPP only on Linux and on platforms without lchmod function. * modules/fchmodat (configure.ac): Invoke gl_PREREQ_FCHMODAT.
* lchmod: Make more future-proof.Bruno Haible2020-02-164-9/+77
| | | | | | | | | | * m4/lchmod.m4 (gl_FUNC_LCHMOD): Define NEED_LCHMOD_NONSYMLINK_FIX. (gl_PREREQ_LCHMOD): New macro. * lib/lchmod.c (orig_lchmod): New function. (lchmod): Test NEED_LCHMOD_NONSYMLINK_FIX. Access /proc only on Linux. Return EOPNOTSUPP only on Linux and on platforms without lchmod function. * modules/lchmod (configure.ac): Invoke gl_PREREQ_LCHMOD.
* lchmod: Fix buggy override on macOS, HP-UX (regression from 2020-02-08).Bruno Haible2020-02-162-1/+5
| | | | * modules/lchmod (Makefile.am): Don't add lchmod.c to lib_SOURCES.
* xnanosleep: prefer pause, and get remaining timePaul Eggert2020-02-164-4/+35
| | | | | | | | | | Problem reported by Vladimir Panteleev in: https://lists.gnu.org/r/bug-gnulib/2020-02/msg00052.html * lib/xnanosleep.c: Include intprops.h, unistd.h. (xnanosleep) [HAVE_PAUSE]: Prefer pause when sleeping infinitely. (xnanosleep): Obtain remaining time when nanosleep is interrupted. * m4/xnanosleep.m4 (gl_XNANOSLEEP): Check for 'pause'. * modules/xnanosleep (Depends-on): Add intprops, unistd.
* lchmod: Improve cross-compilation guess.Bruno Haible2020-02-162-2/+15
| | | | | * m4/lchmod.m4 (gl_FUNC_LCHMOD): Require AC_CANONICAL_HOST. When cross-compiling, guess depending on the platform.
* fstrcmp: Add API to clean up resources.Bruno Haible2020-02-163-0/+32
| | | | | | | | Reported by Akim Demaille <akim@lrde.epita.fr> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00080.html>. * lib/fstrcmp.h (fstrcmp_free_resources): New declaration. * lib/fstrcmp.c (fstrcmp_free_resources): New function.
* wctype-h: Fix compilation errors in C++ (regression from 2020-01-25).Bruno Haible2020-02-143-4/+22
| | | | | | | | | | Reported by Christian Biesinger in <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00064.html>. * lib/wctype.in.h (iswdigit, iswxdigit): Don't declare if the corresponding module is not enabled. * tests/test-wctype-h-c++.cc (iswdigit, iswxdigit): Don't check the prototype if the corresponding module is not enabled.
* fchmodat, lchmod: port to buggy Linux filesystemsPaul Eggert2020-02-133-12/+61
| | | | | | | | | | | | Problem reported by Florian Weimer in: https://www.sourceware.org/ml/libc-alpha/2020-02/msg00534.html * lib/fchmodat.c (fchmodat): * lib/lchmod.c (lchmod): Don’t assume that chmod on the O_PATH-opened fd will do the right thing on a symbolic link. * lib/fchmodat.c (fchmodat): Don’t attempt to special-case any flag value other than AT_SYMLINK_NOFOLLOW.
* autoupdateKarl Berry2020-02-121-19/+13
|
* lchmod: pacify Coverity CID 1491216Paul Eggert2020-02-112-4/+13
| | | | | | * lib/lchmod.c (lchmod): Redo #if nesting so that Coverity does not complain about unreachable code at the ‘struct stat st;’ declaration.
* copysignf: Fix link error on HP-UX with cc.Bruno Haible2020-02-112-2/+14
| | | | | * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Require AC_CANONICAL_HOST. On HP-UX, set COPYSIGNF_LIBM to -lm.
* pthread-mutex-tests, pthread-rwlock-tests: Fix link errors on HP-UX.Bruno Haible2020-02-113-2/+10
| | | | | | | * modules/pthread-mutex-tests (Makefile.am): Link test-pthread-mutex with $(LIB_SEMAPHORE). * modules/pthread-rwlock-tests (Makefile.am): Link test-pthread-rwlock with $(LIB_SEMAPHORE).
* ptsname_r-tests: Avoid unused function warning.Bruno Haible2020-02-112-1/+9
| | | | * tests/test-ptsname_r.c: Don't include null-ptr.h if we don't need it.
* lchmod: Add tests.Bruno Haible2020-02-083-0/+86
| | | | | * tests/test-lchmod.c: New file. * modules/lchmod-tests: New file.
* lchmod: Ensure declaration on HP-UX.Bruno Haible2020-02-083-1/+10
| | | | | * lib/sys_stat.in.h (lchown): Declare also on HP-UX. * doc/glibc-functions/lchmod.texi: Mention the HP-UX problem.
* fchmodat: Strengthen tests.Bruno Haible2020-02-082-3/+18
| | | | | | * tests/test-fchmodat.c (BASE): New macro. (main): Use it, to avoid conflicts with other unit tests. Verify that fchmodat changed the file permission bits.