]> Savannah Git Hosting - gnulib.git/log
gnulib.git
5 years agounlink: Ensure errno also on native Windows.
Bruno Haible [Sun, 22 Mar 2020 01:41:16 +0000 (02:41 +0100)]
unlink: Ensure errno also on native Windows.

* modules/unlink (Depends-on): Add malloc-posix.

5 years agounlink: fix malloc errno typo
Paul Eggert [Sat, 21 Mar 2020 23:13:28 +0000 (16:13 -0700)]
unlink: fix malloc errno typo

Problem reported by Tim Rühsen in:
https://lists.gnu.org/r/bug-gnulib/2020-03/msg00044.html
* lib/unlink.c (rpl_unlink): Don’t mask malloc errno.

5 years ago*printf-posix: Fix m4 error (regression from 2020-03-08).
Bruno Haible [Mon, 16 Mar 2020 13:14:52 +0000 (14:14 +0100)]
*printf-posix: Fix m4 error (regression from 2020-03-08).

* m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): Enable interpretation of
brackets in AC_COMPILE_IFELSE invocation.

5 years agocrypto/af_alg, renameatu, same, term-style-control: Depend on fstat.
Bruno Haible [Sun, 8 Mar 2020 23:55:56 +0000 (00:55 +0100)]
crypto/af_alg, renameatu, same, term-style-control: Depend on fstat.

* modules/crypto/af_alg (Depends-on): Add fstat.
* modules/renameatu (Depends-on): Likewise.
* modules/same (Depends-on): Likewise.
* modules/term-style-control (Depends-on): Likewise.

5 years ago*printf-posix: Document why it's overridden on some glibc systems.
Bruno Haible [Sun, 8 Mar 2020 21:54:02 +0000 (22:54 +0100)]
*printf-posix: Document why it's overridden on some glibc systems.

Reported by Adrian Bunk <bunk@stusta.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00011.html>.

* doc/posix-functions/*printf.texi: Document the problem with the %n
directive on some glibc systems.
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N): Adjust
the cross-compilation guesses accordingly.

5 years agoRevert my last commit, due to compilation errors.
Bruno Haible [Sat, 7 Mar 2020 19:44:47 +0000 (20:44 +0100)]
Revert my last commit, due to compilation errors.

5 years agoopen, openat: port to (O_RDWR | O_RDONLY) != 0
Paul Eggert [Sat, 7 Mar 2020 19:02:05 +0000 (11:02 -0800)]
open, openat: port to (O_RDWR | O_RDONLY) != 0

Potential portability problem reported by Dan Gohman in:
https://lists.gnu.org/r/bug-gnulib/2020-03/msg00000.html
* lib/open.c (open):
* lib/openat.c (rpl_openat):
Don’t assume O_RDONLY is disjoint from O_RDWR.

5 years agofindprog, relocatable-prog: Ignore directories during PATH search.
Bruno Haible [Sat, 7 Mar 2020 18:56:33 +0000 (19:56 +0100)]
findprog, relocatable-prog: Ignore directories during PATH search.

Reported by Frederick Eaton via Dmitry Goncharov in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00003.html>.

* lib/findprog.c (find_in_path): When the file found in a PATH element
is a directory, continue searching.
* lib/progreloc.c (maybe_executable): Likewise.

5 years agoopenat: Fix theoretically possible issue on GNU/Hurd.
Bruno Haible [Sat, 7 Mar 2020 17:35:25 +0000 (18:35 +0100)]
openat: Fix theoretically possible issue on GNU/Hurd.

Reported by Dan Gohman <sunfish@mozilla.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00000.html>.

* lib/openat.c (rpl_openat): When testing whether flags contains O_RDWR,
ignore the bits that are also set in O_RDONLY.

5 years agogetloadavg: Don't use /usr/local when cross-compiling on AIX.
Bruno Haible [Mon, 24 Feb 2020 20:19:28 +0000 (21:19 +0100)]
getloadavg: Don't use /usr/local when cross-compiling on AIX.

Reported by Jens Rehsack <sno@netbsd.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00136.html>.

* m4/getloadavg.m4 (gl_GETLOADAVG): Don't look in /usr/local/lib when
cross-compiling.

5 years agofcntl: Add witness of gnulib override.
Bruno Haible [Mon, 24 Feb 2020 20:05:10 +0000 (21:05 +0100)]
fcntl: Add witness of gnulib override.

Reported by Jens Rehsack <sno@netbsd.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00137.html>.

* lib/fcntl.in.h (GNULIB_defined_rpl_fcntl, GNULIB_defined_fcntl): New
macros.

5 years agousers.txt: Add datamash, time
Assaf Gordon [Mon, 24 Feb 2020 06:07:42 +0000 (23:07 -0700)]
users.txt: Add datamash, time

* users.txt: Add datamash, time.

5 years agouni*/base: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 13:16:53 +0000 (14:16 +0100)]
uni*/base: Use 'restrict'.

* lib/unitypes.in.h (_UC_RESTRICT): New macro, based on '_Restrict_'
from lib/regex.h.
* lib/unistr.in.h (u8_cpy, u16_cpy, u32_cpy, u8_strcpy, u16_strcpy,
u32_strcpy, u8_stpcpy, u16_stpcpy, u32_stpcpy, u8_strncpy, u16_strncpy,
u32_strncpy, u8_stpncpy, u16_stpncpy, u32_stpncpy, u8_strcat,
u16_strcat, u32_strcat, u8_strncat, u16_strncat, u32_strncat, u8_strtok,
u16_strtok, u32_strtok): Use '_UC_RESTRICT'.
* lib/uninorm.in.h (u8_normalize, u16_normalize, u32_normalize): Use
'_UC_RESTRICT'.
* lib/uniconv.in.h (u8_conv_to_encoding, u16_conv_to_encoding,
u32_conv_to_encoding): Use '_UC_RESTRICT'.
* lib/unicase.in.h (u8_toupper, u16_toupper, u32_toupper, u8_tolower,
u16_tolower, u32_tolower, u8_totitle, u16_totitle, u32_totitle,
u8_ct_toupper, u16_ct_toupper, u32_ct_toupper, u8_ct_tolower,
u16_ct_tolower, u32_ct_tolower, u8_ct_totitle, u16_ct_totitle,
u32_ct_totitle, u8_casefold, u16_casefold, u32_casefold, u8_ct_casefold,
u16_ct_casefold, u32_ct_casefold, u8_casexfrm, u16_casexfrm,
u32_casexfrm, ulc_casexfrm): Use '_UC_RESTRICT'.
* lib/unilbrk.in.h (u8_possible_linebreaks, u16_possible_linebreaks,
u32_possible_linebreaks, ulc_possible_linebreaks, u8_width_linebreaks,
u16_width_linebreaks, u32_width_linebreaks, ulc_width_linebreaks): Use
'_UC_RESTRICT'.
* lib/uniwbrk.in.h (ulc_wordbreaks): Use '_UC_RESTRICT'.
* lib/unistdio.in.h (ulc_sprintf, ulc_snprintf, ulc_asnprintf,
ulc_vsprintf, ulc_vsnprintf, ulc_vasnprintf, u8_u8_sprintf,
u8_u8_snprintf, u8_u8_asnprintf, u8_u8_vsprintf, u8_u8_vsnprintf,
u8_u8_vasnprintf, u16_u16_sprintf, u16_u16_snprintf, u16_u16_asnprintf,
u16_u16_vsprintf, u16_u16_vsnprintf, u16_u16_vasnprintf,
u32_u32_sprintf, u32_u32_snprintf, u32_u32_asnprintf, u32_u32_vsprintf,
u32_u32_vsnprintf, u32_u32_vasnprintf): Use '_UC_RESTRICT'.

5 years agoglob, spawn: Use improved '_Restrict_' definition.
Bruno Haible [Sun, 23 Feb 2020 13:24:04 +0000 (14:24 +0100)]
glob, spawn: Use improved '_Restrict_' definition.

* lib/glob.in.h (_Restrict_): Use same definition as in lib/regex.h.
* lib/spawn.in.h (_Restrict_, _Restrict_arr_): Likewise.

5 years agocrypto/gc: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:29:14 +0000 (13:29 +0100)]
crypto/gc: Use 'restrict'.

* lib/gc.h (gc_pbkdf2_hmac, gc_pbkdf2_sha1): Use 'restrict'.
* m4/gc.m4 (gl_GC): Require AC_C_RESTRICT.

5 years agocrypto/hmac-*: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:27:35 +0000 (13:27 +0100)]
crypto/hmac-*: Use 'restrict'.

* lib/hmac.h (hmac_md5, hmac_sha1, hmac_sha256, hmac_sha512): Use
'restrict'.
* modules/crypto/hmac-md5 (configure.ac): Require AC_C_RESTRICT.
* modules/crypto/hmac-sha1 (configure.ac): Likewise.
* modules/crypto/hmac-sha256 (configure.ac): Likewise.
* modules/crypto/hmac-sha512 (configure.ac): Likewise.

5 years agocrypto/sm3: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:25:28 +0000 (13:25 +0100)]
crypto/sm3: Use 'restrict'.

* lib/sm3.h (sm3_finish_ctx, sm3_read_ctx, sm3_buffer): Use 'restrict'.
* m4/sm3.m4 (gl_SM3): Require AC_C_RESTRICT.

5 years agocrypto/*-buffer: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:22:42 +0000 (13:22 +0100)]
crypto/*-buffer: Use 'restrict'.

* lib/gl_openssl.h (GL_CRYPTO_FN (_finish_ctx), GL_CRYPTO_FN (_buffer),
GL_CRYPTO_FN (_read_ctx)): Use 'restrict'.

5 years agocrypto/sha512-buffer: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:20:18 +0000 (13:20 +0100)]
crypto/sha512-buffer: Use 'restrict'.

* lib/sha512.h (sha512_finish_ctx, sha384_finish_ctx, sha512_read_ctx,
sha384_read_ctx, sha512_buffer, sha384_buffer): Use 'restrict'.
* modules/crypto/sha512-buffer (configure.ac): Require AC_C_RESTRICT.

5 years agocrypto/sha256-buffer: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:18:33 +0000 (13:18 +0100)]
crypto/sha256-buffer: Use 'restrict'.

* lib/sha256.h (sha256_finish_ctx, sha224_finish_ctx, sha256_read_ctx,
sha224_read_ctx, sha256_buffer, sha224_buffer): Use 'restrict'.
* modules/crypto/sha256-buffer (configure.ac): Require AC_C_RESTRICT.

5 years agocrypto/sha1-buffer: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:16:44 +0000 (13:16 +0100)]
crypto/sha1-buffer: Use 'restrict'.

* lib/sha1.h (sha1_finish_ctx, sha1_read_ctx, sha1_buffer): Use
'restrict'.
* modules/crypto/sha1-buffer (configure.ac): Require AC_C_RESTRICT.

5 years agocrypto/md5-buffer: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:15:15 +0000 (13:15 +0100)]
crypto/md5-buffer: Use 'restrict'.

* lib/md5.h (__md5_finish_ctx, __md5_read_ctx, __md5_buffer): Use
'restrict'.
* modules/crypto/md5-buffer (configure.ac): Require AC_C_RESTRICT.

5 years agocrypto/md4: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:13:38 +0000 (13:13 +0100)]
crypto/md4: Use 'restrict'.

* lib/md4.h (md4_finish_ctx, md4_read_ctx, md4_buffer): Use 'restrict'.
* modules/crypto/md4 (configure.ac): Require AC_C_RESTRICT.

5 years agocrypto/md2: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:12:16 +0000 (13:12 +0100)]
crypto/md2: Use 'restrict'.

* lib/md2.h (md2_finish_ctx, md2_read_ctx, md2_buffer): Use 'restrict'.
* modules/crypto/md2 (configure.ac): Require AC_C_RESTRICT.

5 years agocrypto/rijndael: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:08:14 +0000 (13:08 +0100)]
crypto/rijndael: Use 'restrict'.

* lib/rijndael-api-fst.h (rijndaelBlockEncrypt, rijndaelPadEncrypt,
rijndaelBlockDecrypt, rijndaelPadDecrypt): Use 'restrict'.
* modules/crypto/rijndael (configure.ac): Require AC_C_RESTRICT.

5 years agocrypto/arctwo: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:05:57 +0000 (13:05 +0100)]
crypto/arctwo: Use 'restrict'.

* lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'.
* modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT.

5 years agocrypto/arcfour: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 12:04:13 +0000 (13:04 +0100)]
crypto/arcfour: Use 'restrict'.

* lib/arcfour.h (arcfour_stream): Use 'restrict'.
* modules/crypto/arcfour (configure.ac): Require AC_C_RESTRICT.

5 years agocareadlinkat: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:35:14 +0000 (12:35 +0100)]
careadlinkat: Use 'restrict'.

* lib/careadlinkat.h (careadlinkat): Use 'restrict'.
* modules/careadlinkat (configure.ac): Require AC_C_RESTRICT.
* modules/relocatable-prog-wrapper (configure.ac): Likewise.

5 years agoregex-quote: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:33:37 +0000 (12:33 +0100)]
regex-quote: Use 'restrict'.

* lib/regex-quote.h (regex_quote_copy): Use 'restrict'.
* modules/regex-quote (configure.ac): Require AC_C_RESTRICT.

5 years agosystem-quote: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:32:25 +0000 (12:32 +0100)]
system-quote: Use 'restrict'.

* lib/system-quote.h (system_quote_copy): Use 'restrict'.
* modules/system-quote (configure.ac): Require AC_C_RESTRICT.

5 years agosh-quote: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:31:00 +0000 (12:31 +0100)]
sh-quote: Use 'restrict'.

* lib/sh-quote.h (shell_quote_copy): Use 'restrict'.
* modules/sh-quote (configure.ac): Require AC_C_RESTRICT.

5 years agoquotearg: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:29:41 +0000 (12:29 +0100)]
quotearg: Use 'restrict'.

* lib/quotearg.h (quotearg_buffer): Use 'restrict'.
* m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT.

5 years agoparse-datetime: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:27:58 +0000 (12:27 +0100)]
parse-datetime: Use 'restrict'.

* lib/parse-datetime.h (parse_datetime, parse_datetime2): Use
'restrict'.
* m4/parse-datetime.m4 (gl_PARSE_DATETIME): Require AC_C_RESTRICT.

5 years agonstrftime: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:25:42 +0000 (12:25 +0100)]
nstrftime: Use 'restrict'.

* lib/strftime.h (nstrftime): Use 'restrict'.
* m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Require AC_C_RESTRICT.

5 years agombstok_r: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:24:01 +0000 (12:24 +0100)]
mbstok_r: Use 'restrict'.

* lib/string.in.h (mbstok_r): Use 'restrict'.

5 years agoxmemcoll: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:20:35 +0000 (12:20 +0100)]
xmemcoll: Use 'restrict'.

* lib/xmemcoll.h (xmemcoll): Use 'restrict'.
* modules/xmemcoll (configure.ac): Require AC_C_RESTRICT.

5 years agomemcoll: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:19:28 +0000 (12:19 +0100)]
memcoll: Use 'restrict'.

* lib/memcoll.h (memcoll): Use 'restrict'.
* m4/memcoll.m4 (gl_MEMCOLL): Require AC_C_RESTRICT.

5 years agovasnprintf: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:17:44 +0000 (12:17 +0100)]
vasnprintf: Use 'restrict'.

* lib/vasnprintf.h (asnprintf, vasnprintf): Use 'restrict'.
* modules/vasnprintf (configure.ac): Require AC_C_RESTRICT.

5 years agoc-vasnprintf: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:15:09 +0000 (12:15 +0100)]
c-vasnprintf: Use 'restrict'.

* lib/c-vasnprintf.h (c_vasnprintf): Use 'restrict'.
* modules/c-vasnprintf (configure.ac): Require AC_C_RESTRICT.

5 years agoc-vsnprintf: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:13:40 +0000 (12:13 +0100)]
c-vsnprintf: Use 'restrict'.

* lib/c-vsnprintf.h (c_vsnprintf): Use 'restrict'.
* modules/c-vsnprintf (configure.ac): Require AC_C_RESTRICT.

5 years agoc-snprintf: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:12:09 +0000 (12:12 +0100)]
c-snprintf: Use 'restrict'.

* lib/c-snprintf.h (c_snprintf): Use 'restrict'.
* modules/c-snprintf (configure.ac): Require AC_C_RESTRICT.

5 years agoastrxfrm: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:06:29 +0000 (12:06 +0100)]
astrxfrm: Use 'restrict'.

* lib/astrxfrm.h (astrxfrm): Use 'restrict'.
* modules/astrxfrm (configure.ac): Require AC_C_RESTRICT.

5 years agoamemxfrm: Use 'restrict'.
Bruno Haible [Sun, 23 Feb 2020 11:04:46 +0000 (12:04 +0100)]
amemxfrm: Use 'restrict'.

* lib/amemxfrm.h (amemxfrm): Use 'restrict'.
* modules/amemxfrm (configure.ac): Require AC_C_RESTRICT.

5 years agofchmodat, lchmod: simplify
Paul Eggert [Sun, 23 Feb 2020 06:47:06 +0000 (22:47 -0800)]
fchmodat, lchmod: simplify

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.

5 years agolchmod: Fix link error on Solaris 10 (regression from 2020-02-16).
Bruno Haible [Sat, 22 Feb 2020 23:44:20 +0000 (00:44 +0100)]
lchmod: Fix link error on Solaris 10 (regression from 2020-02-16).

* lib/lchmod.c (lchmod): Use the code with lstat and chmod also when
NEED_LCHMOD_NONSYMLINK_FIX is not defined.

5 years agoUse 'restrict' in all POSIX function declarations.
Bruno Haible [Sat, 22 Feb 2020 19:57:30 +0000 (20:57 +0100)]
Use 'restrict' in all POSIX function declarations.

* 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.

5 years agoUpdate NEWS.
Bruno Haible [Sat, 22 Feb 2020 22:47:00 +0000 (23:47 +0100)]
Update NEWS.

* NEWS: Mention the last change.

5 years agochmodat, chownat: new modules
Paul Eggert [Sat, 22 Feb 2020 20:09:11 +0000 (12:09 -0800)]
chmodat, chownat: new modules

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.

5 years agousers.txt: Add groff.
Bruno Haible [Sat, 22 Feb 2020 17:42:50 +0000 (18:42 +0100)]
users.txt: Add groff.

Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is>.

* users.txt: Add groff.

5 years agoUpdate gnulib-tool.py.TODO.
Bruno Haible [Sat, 22 Feb 2020 14:19:36 +0000 (15:19 +0100)]
Update gnulib-tool.py.TODO.

5 years agognulib-tool: Ensure copied files are writable.
Bruno Haible [Sat, 22 Feb 2020 14:15:01 +0000 (15:15 +0100)]
gnulib-tool: Ensure copied files are writable.

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.

5 years agousers.txt: Update.
Bruno Haible [Sat, 22 Feb 2020 13:53:02 +0000 (14:53 +0100)]
users.txt: Update.

* 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.

5 years agolargefile: remove _DARWIN_USE_64_BIT_INODE
Paul Eggert [Sat, 22 Feb 2020 01:27:02 +0000 (17:27 -0800)]
largefile: remove _DARWIN_USE_64_BIT_INODE

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.

5 years agoAdd ‘extern "C"’ to count-one-bits.h etc.
Paul Eggert [Fri, 21 Feb 2020 20:41:33 +0000 (12:41 -0800)]
Add ‘extern "C"’ to count-one-bits.h etc.

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"’.

5 years agousers.txt: update cmogstored URL
Eric Wong [Thu, 20 Feb 2020 00:35:30 +0000 (16:35 -0800)]
users.txt: update cmogstored URL

bogomips.org is expiring and .org is unlikely to be affordable
down the line, so it's on yhbt.net for now.

5 years agouninorm/decompose-internal: Avoid "no previous prototype" warning.
Bruno Haible [Wed, 19 Feb 2020 19:28:15 +0000 (20:28 +0100)]
uninorm/decompose-internal: Avoid "no previous prototype" warning.

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.

5 years agofchmodat: Make more future-proof.
Bruno Haible [Sun, 16 Feb 2020 22:01:08 +0000 (23:01 +0100)]
fchmodat: Make more future-proof.

* 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.

5 years agolchmod: Make more future-proof.
Bruno Haible [Sun, 16 Feb 2020 21:37:28 +0000 (22:37 +0100)]
lchmod: Make more future-proof.

* 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.

5 years agolchmod: Fix buggy override on macOS, HP-UX (regression from 2020-02-08).
Bruno Haible [Sun, 16 Feb 2020 21:31:34 +0000 (22:31 +0100)]
lchmod: Fix buggy override on macOS, HP-UX (regression from 2020-02-08).

* modules/lchmod (Makefile.am): Don't add lchmod.c to lib_SOURCES.

5 years agoxnanosleep: prefer pause, and get remaining time
Paul Eggert [Sun, 16 Feb 2020 20:47:52 +0000 (12:47 -0800)]
xnanosleep: prefer pause, and get remaining time

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.

5 years agolchmod: Improve cross-compilation guess.
Bruno Haible [Sun, 16 Feb 2020 18:51:25 +0000 (19:51 +0100)]
lchmod: Improve cross-compilation guess.

* m4/lchmod.m4 (gl_FUNC_LCHMOD): Require AC_CANONICAL_HOST. When
cross-compiling, guess depending on the platform.

5 years agofstrcmp: Add API to clean up resources.
Bruno Haible [Sun, 16 Feb 2020 12:49:49 +0000 (13:49 +0100)]
fstrcmp: Add API to clean up resources.

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.

5 years agowctype-h: Fix compilation errors in C++ (regression from 2020-01-25).
Bruno Haible [Fri, 14 Feb 2020 18:44:08 +0000 (19:44 +0100)]
wctype-h: Fix compilation errors in C++ (regression from 2020-01-25).

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.

5 years agofchmodat, lchmod: port to buggy Linux filesystems
Paul Eggert [Thu, 13 Feb 2020 18:41:10 +0000 (10:41 -0800)]
fchmodat, lchmod: port to buggy Linux filesystems

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.

5 years agoautoupdate
Karl Berry [Wed, 12 Feb 2020 15:32:08 +0000 (07:32 -0800)]
autoupdate

5 years agolchmod: pacify Coverity CID 1491216
Paul Eggert [Wed, 12 Feb 2020 07:33:00 +0000 (23:33 -0800)]
lchmod: pacify Coverity CID 1491216

* lib/lchmod.c (lchmod): Redo #if nesting so that Coverity does
not complain about unreachable code at the ‘struct stat st;’
declaration.

5 years agocopysignf: Fix link error on HP-UX with cc.
Bruno Haible [Tue, 11 Feb 2020 03:13:39 +0000 (04:13 +0100)]
copysignf: Fix link error on HP-UX with cc.

* m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Require AC_CANONICAL_HOST. On
HP-UX, set COPYSIGNF_LIBM to -lm.

5 years agopthread-mutex-tests, pthread-rwlock-tests: Fix link errors on HP-UX.
Bruno Haible [Tue, 11 Feb 2020 02:58:39 +0000 (03:58 +0100)]
pthread-mutex-tests, pthread-rwlock-tests: Fix link errors on HP-UX.

* 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).

5 years agoptsname_r-tests: Avoid unused function warning.
Bruno Haible [Tue, 11 Feb 2020 02:26:14 +0000 (03:26 +0100)]
ptsname_r-tests: Avoid unused function warning.

* tests/test-ptsname_r.c: Don't include null-ptr.h if we don't need it.

5 years agolchmod: Add tests.
Bruno Haible [Sat, 8 Feb 2020 20:24:35 +0000 (21:24 +0100)]
lchmod: Add tests.

* tests/test-lchmod.c: New file.
* modules/lchmod-tests: New file.

5 years agolchmod: Ensure declaration on HP-UX.
Bruno Haible [Sat, 8 Feb 2020 20:22:15 +0000 (21:22 +0100)]
lchmod: Ensure declaration on HP-UX.

* lib/sys_stat.in.h (lchown): Declare also on HP-UX.
* doc/glibc-functions/lchmod.texi: Mention the HP-UX problem.

5 years agofchmodat: Strengthen tests.
Bruno Haible [Sat, 8 Feb 2020 19:47:58 +0000 (20:47 +0100)]
fchmodat: Strengthen tests.

* 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.

5 years agofchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07).
Bruno Haible [Sat, 8 Feb 2020 19:41:20 +0000 (20:41 +0100)]
fchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07).

* lib/fchmodat.c (orig_fchmodat): Move definition to immediately after
'#undef __need_system_sys_stat_h'.

5 years agofchmodat: Improve cross-compilation guesses.
Bruno Haible [Sat, 8 Feb 2020 19:38:01 +0000 (20:38 +0100)]
fchmodat: Improve cross-compilation guesses.

* m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Require AC_CANONICAL_HOST. When
cross-compiling, guess depending on the platform.
* doc/posix-functions/fchmodat.texi: Clarify.

5 years agoFix compilation errors in a testdir created with --with-c++-tests.
Bruno Haible [Sat, 8 Feb 2020 16:39:26 +0000 (17:39 +0100)]
Fix compilation errors in a testdir created with --with-c++-tests.

* lib/c++defs.h (_GL_CXXALIASWARN1_2): Do not use __typeof__ (func),
since it does not work any more with g++ >= 4.4.

5 years agodoc: Update for glibc 2.31.
Bruno Haible [Sat, 8 Feb 2020 14:54:25 +0000 (15:54 +0100)]
doc: Update for glibc 2.31.

* doc/glibc-functions/pthread_clockjoin_np.texi: New file.
* doc/gnulib.texi: Include it.
* doc/pastposix-functions/h_errno.texi: Update.
* doc/posix-functions/*.texi: Likewise.

5 years agomountlist: consider smb3 file systems as remote
Kenneth D'souza [Sat, 8 Feb 2020 13:54:35 +0000 (13:54 +0000)]
mountlist: consider smb3 file systems as remote

* lib/mountlist.c (ME_REMOTE): Recognize file systems of type
"smb3" as remote.

5 years agofchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks
Paul Eggert [Sat, 8 Feb 2020 00:34:12 +0000 (16:34 -0800)]
fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks

Fix lchmod, and fchmodat with AT_SYMLINK_NOFOLLOW, so that
they act like chmod on non-symlinks.
* NEWS:
* doc/glibc-functions/lchmod.texi (lchmod):
* doc/posix-functions/fchmodat.texi (fchmodat):
Mention this.
* lib/fchmodat.c: Define __need_system_sys_stat_h before including
config.h, and undef it after including sys/stat.h the first time.
Include fcntl.h, stdio.h, unistd.h, intprops.h, and include
sys/stat.h a second time after defining orig_fchmodat.
(orig_fchmodat) [HAVE_FCHMODAT]: New function.
(fchmodat) [HAVE_FCHMODAT]: Work around the AT_SYMLINK_NOFOLLOW bug.
* lib/lchmod.c: New file.
* lib/sys_stat.in.h (fchmodat, lchmod):
Support replacing these functions.
* m4/fchmodat.m4 (gl_FUNC_FCHMODAT): If fchmodat exists,
test that AT_SYMLINK_NOFOLLOW works on non-symlinks.
* m4/lchmod.m4 (gl_FUNC_LCHMOD): Check for lstat.
Test that lchmod works on non-symlinks.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS):
Default REPLACE_FCHMODAT and REPLACE_LCHMOD to 0.
* modules/fchmodat (Depends-on): Add fstatat, intprops, lchmod, unistd.
(Depends-on, configure.ac): Check REPLACE_FCHMODAT too.
* modules/lchmod (Files): Add lib/lchmod.c.
(Depends-on): Add errno, fcntl-h, fchmodat, intprops, lstat, unistd.
(configure.ac): Compile lchmod.c if needed.
(lib_SOURCES): Add lchmod.c.
* modules/sys_stat (sys/stat.h): Substitute REPLACE_FCHMODAT
and REPLACE_LCHMOD.
* tests/test-fchmodat.c: Include fcntl.h, sys/stat.h.
(main): Test fchmodat with AT_SYMLINK_NOFOLLOW on non-symlinks.

5 years ago* lib/mountlist.c: fix formatting
Paul Eggert [Wed, 5 Feb 2020 21:45:50 +0000 (13:45 -0800)]
* lib/mountlist.c: fix formatting

5 years agomountlist: Consider AFS filesystems as remote
Marc Dionne [Wed, 5 Feb 2020 21:35:12 +0000 (13:35 -0800)]
mountlist: Consider AFS filesystems as remote

df --local relies on the ME_REMOTE macro to determine if a given
mount entry should be considered "local".  There is special logic
for nfs and smb/cifs mounts, but /afs as mounted by OpenAFS, the
kernel's kafs module or AuriStorFS is treated as a local mount.
* lib/mountlist.c (ME_REMOTE): Treat mounts of type 'afs'
(OpenAFS, kernel kafs) and 'auristorfs' (AuriStorFS) as remote.

Copyright-paperwork-exempt: yes

5 years agoPort _Noreturn to older Clang
Paul Eggert [Mon, 3 Feb 2020 21:20:09 +0000 (13:20 -0800)]
Port _Noreturn to older Clang

Problem reported by Jeffery Walton in:
https://lists.gnu.org/r/bug-gnulib/2020-02/msg00013.html
* lib/_Noreturn.h (_Noreturn):
* m4/gnulib-common.m4 (gl_COMMON_BODY):
Assume _Noreturn works in Clang 3.5 and later.
It is documented to work in Clang 3.5:
http://releases.llvm.org/3.5.0/tools/clang/docs/AttributeReference.html
and is not documented in Clang 3.4:
https://releases.llvm.org/3.4/tools/clang/docs/LanguageExtensions.html
Apple sets __clang_version__ to a different value, so use
__apple_build_version__ there.  See:
https://lists.gnu.org/r/bug-gnulib/2020-02/msg00017.html

5 years agotest-canonicalize: avoid an unused function warning
Pádraig Brady [Tue, 4 Feb 2020 00:57:12 +0000 (00:57 +0000)]
test-canonicalize: avoid an unused function warning

* tests/test-canonicalize.c: Protect the inclusion of null-ptr.h
with the same guard as that used to protect usage of the null_ptr
function, so that one doesn't get a -Wunused warning
about the function being defined but unused.
* tests/test-canonicalize-lgpl.c: Likewise.

5 years agolibc-config: port to Apple’s Clang variant
Paul Eggert [Tue, 4 Feb 2020 03:01:22 +0000 (19:01 -0800)]
libc-config: port to Apple’s Clang variant

* lib/libc-config.h (__glibc_clang_prereq):
Port to Apple’s Clang variant, which uses a different
numbering scheme for __clang_major__.

5 years agoDocument the new modules list-c++, set-c++, oset-c++, map-c++, omap-c++.
Bruno Haible [Sun, 2 Feb 2020 18:25:05 +0000 (19:25 +0100)]
Document the new modules list-c++, set-c++, oset-c++, map-c++, omap-c++.

* doc/containers.texi: Document these new modules.

5 years agoomap-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:08:15 +0000 (19:08 +0100)]
omap-c++: Add tests.

* tests/test-omap-c++.cc: New file.
* modules/omap-c++-tests: New file.

5 years agoomap-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 18:07:17 +0000 (19:07 +0100)]
omap-c++: New module.

* lib/gl_omap.hh: New file, based on lib/gl_omap.h.
* modules/omap-c++: New file.

5 years agomap-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:06:33 +0000 (19:06 +0100)]
map-c++: Add tests.

* tests/test-map-c++.cc: New file.
* modules/map-c++-tests: New file.

5 years agomap-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 18:05:19 +0000 (19:05 +0100)]
map-c++: New module.

* lib/gl_map.hh: New file, based on lib/gl_map.h.
* modules/map-c++: New file.

5 years agooset-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:04:19 +0000 (19:04 +0100)]
oset-c++: Add tests.

* tests/test-oset-c++.cc: New file.
* modules/oset-c++-tests: New file.

5 years agooset-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 18:03:39 +0000 (19:03 +0100)]
oset-c++: New module.

* lib/gl_oset.hh: New file, based on lib/gl_oset.h.
* modules/oset-c++: New file.

5 years agoset-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:02:10 +0000 (19:02 +0100)]
set-c++: Add tests.

* tests/test-set-c++.cc: New file.
* modules/set-c++-tests: New file.

5 years agoset-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 18:01:38 +0000 (19:01 +0100)]
set-c++: New module.

* lib/gl_set.hh: New file, based on lib/gl_set.h.
* modules/set-c++: New file.

5 years agolist-c++: Add tests.
Bruno Haible [Sun, 2 Feb 2020 18:00:11 +0000 (19:00 +0100)]
list-c++: Add tests.

* tests/test-list-c++.cc: New file.
* modules/list-c++-tests: New file.

5 years agolist-c++: New module.
Bruno Haible [Sun, 2 Feb 2020 17:59:00 +0000 (18:59 +0100)]
list-c++: New module.

* lib/gl_list.hh: New file, based on lib/gl_list.h.
* modules/list-c++: New file.

5 years agoxalloc: Fix compilation error in C++ mode on FreeBSD 12.
Bruno Haible [Sun, 2 Feb 2020 17:16:55 +0000 (18:16 +0100)]
xalloc: Fix compilation error in C++ mode on FreeBSD 12.

* lib/xalloc.h (xalloc_die): Comment out 'extern' keyword before
'_Noreturn'.
* lib/sigpipe-die.h (sigpipe_die): Likewise.

5 years agoread-file: reduce max size from SIZE_MAX to PTRDIFF_MAX
Pádraig Brady [Sun, 2 Feb 2020 16:06:48 +0000 (16:06 +0000)]
read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX

On x86_64 with glibc-2.30, gcc 9.2 is giving:
  error: argument 2 value '18446744073709551615'
  exceeds maximum object size 9223372036854775807
  [-Werror=alloc-size-larger-than=]
The details of this restriction are discussed at:
https://stackoverflow.com/q/42574890/4421
* lib/read-file.c: s/SIZE_MAX/PTRDIFF_MAX/

5 years agosysctl.h: avoid including on glibc
Pádraig Brady [Sun, 2 Feb 2020 15:24:02 +0000 (15:24 +0000)]
sysctl.h: avoid including on glibc

* lib/nproc.c: Avoid including deprecated and unneeded header on GLIBC.
glibc deprecated this header since v2.30.
* lib/physmem.c: Likewise.

5 years agolist, set, oset, map, omap: Avoid imperative voice in documentation.
Bruno Haible [Sun, 2 Feb 2020 12:31:11 +0000 (13:31 +0100)]
list, set, oset, map, omap: Avoid imperative voice in documentation.

* lib/gl_map.h: Use descriptive sentences instead of imperative voice
in the specification of functions.
* lib/gl_omap.h: Likewise.

5 years agolist, set, oset, map, omap: Avoid imperative voice in documentation.
Bruno Haible [Sun, 2 Feb 2020 12:15:34 +0000 (13:15 +0100)]
list, set, oset, map, omap: Avoid imperative voice in documentation.

* lib/gl_list.h: Use descriptive sentences instead of imperative voice
in the specification of functions.
* lib/gl_set.h: Likewise.
* lib/gl_oset.h: Likewise.
* lib/gl_map.h: Likewise.
* lib/gl_omap.h: Likewise.
* lib/gl_*.h: Likewise.

5 years agoansi-c++-opt: Set CXXFLAGS to "-g -O2" by default.
Bruno Haible [Sat, 1 Feb 2020 14:51:26 +0000 (15:51 +0100)]
ansi-c++-opt: Set CXXFLAGS to "-g -O2" by default.

* m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Determine CXXFLAGS like AC_PROG_CXX
does.