]> Savannah Git Hosting - gnulib.git/log
gnulib.git
7 years agocrypto/{md5,sha1,sha256,sha512}: Fix compilation error (S_TYPEISTMO).
Bruno Haible [Sat, 5 May 2018 16:09:40 +0000 (18:09 +0200)]
crypto/{md5,sha1,sha256,sha512}: Fix compilation error (S_TYPEISTMO).

* modules/crypto/md5 (Depends-on): Add 'sys_stat'.
* modules/crypto/sha1 (Depends-on): Likewise.
* modules/crypto/sha256 (Depends-on): Likewise.
* modules/crypto/sha512 (Depends-on): Likewise.

7 years agocrypto/{md5,sha1,sha256,sha512}: Fix module description.
Bruno Haible [Sat, 5 May 2018 16:04:43 +0000 (18:04 +0200)]
crypto/{md5,sha1,sha256,sha512}: Fix module description.

* modules/crypto/md5 (Depends-on): Add 'sys_socket'.
* modules/crypto/sha1 (Depends-on): Likewise.
* modules/crypto/sha256 (Depends-on): Likewise.
* modules/crypto/sha512 (Depends-on): Likewise.

7 years agoaf_alg: Add documentation.
Bruno Haible [Sat, 5 May 2018 15:50:51 +0000 (17:50 +0200)]
af_alg: Add documentation.

* lib/af_alg.h: Add comments.

7 years agosha512: Add tests.
Bruno Haible [Sat, 5 May 2018 15:42:46 +0000 (17:42 +0200)]
sha512: Add tests.

* tests/test-sha512.c: New file.
* modules/crypto/sha512-tests: New file.

7 years agosha256: Add tests.
Bruno Haible [Sat, 5 May 2018 15:41:35 +0000 (17:41 +0200)]
sha256: Add tests.

* tests/test-sha256.c: New file.
* modules/crypto/sha256-tests: New file.

7 years agosha1 tests: Add test for sha1_stream.
Bruno Haible [Sat, 5 May 2018 15:39:57 +0000 (17:39 +0200)]
sha1 tests: Add test for sha1_stream.

* tests/test-sha1.c: Include test-digest.h.
(main): Invoke test_digest_on_files on 'sha1_stream'.
* modules/crypto/sha1-tests (Files): Add tests/test-digest.h.

7 years agomd5 tests: Add test for md5_stream.
Bruno Haible [Sat, 5 May 2018 15:38:39 +0000 (17:38 +0200)]
md5 tests: Add test for md5_stream.

* tests/test-digest.h: New file.
* tests/test-md5.c: Include test-digest.h.
(main): Invoke test_digest_on_files on 'md5_stream'.
* modules/crypto/md5-tests (Files): Add tests/test-digest.h.

7 years agoautoupdate
Karl Berry [Sat, 5 May 2018 15:18:49 +0000 (08:18 -0700)]
autoupdate

7 years agomd5sum: use kernel crypto API
Matteo Croce [Sat, 28 Apr 2018 13:32:58 +0000 (15:32 +0200)]
md5sum: use kernel crypto API

Use AF_ALG for md5 too

Signed-off-by: Matteo Croce <mcroce@redhat.com>
7 years agosha512sum: use kernel crypto API
Matteo Croce [Sat, 28 Apr 2018 13:32:57 +0000 (15:32 +0200)]
sha512sum: use kernel crypto API

Use AF_ALG for sha384 and sha512 too

Signed-off-by: Matteo Croce <mcroce@redhat.com>
7 years agosha256sum: use kernel crypto API
Matteo Croce [Sat, 28 Apr 2018 13:32:56 +0000 (15:32 +0200)]
sha256sum: use kernel crypto API

Use AF_ALG for sha224 and sha256 too

Signed-off-by: Matteo Croce <mcroce@redhat.com>
7 years agosha1sum: use AF_ALG when available
Matteo Croce [Sat, 28 Apr 2018 13:32:55 +0000 (15:32 +0200)]
sha1sum: use AF_ALG when available

Linux supports accessing kernel crypto API via AF_ALG since
version 2.6.38. Coreutils uses libcrypto when available and fallbacks to
generic C implementation of various hashing functions.

Add a generic afalg_stream() function which uses AF_ALG to calculate the
hash of a stream and use sendfile() when possible (regular file with size
less or equal than 0x7ffff000 (2,147,479,552) bytes, AKA MAX_RW_COUNT).

Use afalg_stream() only in sha1sum for now, but other hashes are possible.
The speed gain really depends on the CPU type, on systems which doesn't use
libcrypto ranges from ~10% to 320%.

This is a test on a Intel(R) Xeon(R) CPU E3-1265L V2 and Debian stretch:

    $ truncate -s 2GB 2g.bin
    $ time sha1sum 2g.bin
    752ef2367f479e79e4f0cded9c270c2890506ab0  2g.bin

    real    0m4.829s
    user    0m4.437s
    sys     0m0.391s
    $ time ./sha1sum-afalg 2g.bin
    752ef2367f479e79e4f0cded9c270c2890506ab0  2g.bin

    real    0m3.164s
    user    0m0.000s
    sys     0m3.162s

Signed-off-by: Matteo Croce <mcroce@redhat.com>
7 years agoall: Replace more http URLs by https URLs.
Bruno Haible [Sat, 5 May 2018 10:23:02 +0000 (12:23 +0200)]
all: Replace more http URLs by https URLs.

* lib/localename.c: Use https: URL.
* lib/timespec.h: Likewise.

7 years agomaint: port more modules to GCC 8
Paul Eggert [Fri, 4 May 2018 00:38:50 +0000 (17:38 -0700)]
maint: port more modules to GCC 8

* lib/dirname.h (base_name):
* lib/exclude.h (new_exclude):
* lib/xstrndup.h (xstrndup):
Add malloc attribute.
* lib/readutmp.c: Pacify GCC 8 about safe use of strncpy.
* lib/sig-handler.h (get_handler) [SA_SIGINFO]: Simplify.
This pacifies GCC 8.
* m4/gnulib-common.m4 (gl_COMMON_BODY):
Define _GL_ATTRIBUTE_MALLOC here.  All other definitions removed.

7 years agoSimplify code. Drop support for Borland C++ on Windows.
Bruno Haible [Thu, 3 May 2018 21:09:42 +0000 (23:09 +0200)]
Simplify code. Drop support for Borland C++ on Windows.

Reported by Gisle Vanem <gisle.vanem@gmail.com>.

* lib/accept4.c: Simplify 'defined _WIN32 || defined __WIN32__' to just
'defined _WIN32'.
* lib/canonicalize-lgpl.c: Likewise.
* lib/classpath.c: Likewise.
* lib/clean-temp.c: Likewise.
* lib/csharpexec.c: Likewise.
* lib/ctime.c: Likewise.
* lib/dosname.h: Likewise.
* lib/dup2.c: Likewise.
* lib/errno.in.h: Likewise.
* lib/error.c: Likewise.
* lib/euidaccess.c: Likewise.
* lib/execute.c: Likewise.
* lib/fcntl.in.h: Likewise.
* lib/fcntl.c: Likewise.
* lib/filename.h: Likewise.
* lib/findprog.c: Likewise.
* lib/flock.c: Likewise.
* lib/fopen.c: Likewise.
* lib/freopen.c: Likewise.
* lib/fstat.c: Likewise.
* lib/fsync.c: Likewise.
* lib/gc-gnulib.c: Likewise.
* lib/get-rusage-data.c: Likewise.
* lib/getaddrinfo.c: Likewise.
* lib/getdelim.c: Likewise.
* lib/getdtablesize.c: Likewise.
* lib/gethostname.c: Likewise.
* lib/getlogin.c: Likewise.
* lib/getlogin_r.c: Likewise.
* lib/getopt.c: Likewise.
* lib/getpagesize.c: Likewise.
* lib/getpass.c: Likewise.
* lib/getrusage.c: Likewise.
* lib/gettimeofday.c: Likewise.
* lib/glob.c: Likewise.
* lib/inttypes.in.h: Likewise.
* lib/isapipe.c: Likewise.
* lib/javaexec.c: Likewise.
* lib/link.c: Likewise.
* lib/localcharset.c: Likewise.
* lib/localename.h: Likewise.
* lib/localename.c: Likewise.
* lib/localtime.c: Likewise.
* lib/lseek.c: Likewise.
* lib/mbsinit.c: Likewise.
* lib/mkdir.c: Likewise.
* lib/msvc-nothrow.h: Likewise.
* lib/nanosleep.c: Likewise.
* lib/nl_langinfo.c: Likewise.
* lib/nonblocking.c: Likewise.
* lib/nproc.c: Likewise.
* lib/open.c: Likewise.
* lib/openpty.c: Likewise.
* lib/pathmax.h: Likewise.
* lib/pipe-filter-aux.c: Likewise.
* lib/pipe-filter-gi.c: Likewise.
* lib/pipe-filter-ii.c: Likewise.
* lib/pipe.c: Likewise.
* lib/pipe2.c: Likewise.
* lib/poll.c: Likewise.
* lib/popen.c: Likewise.
* lib/posix_openpt.c: Likewise.
* lib/printf-parse.c: Likewise.
* lib/progreloc.c: Likewise.
* lib/putenv.c: Likewise.
* lib/read.c: Likewise.
* lib/relocatable.c: Likewise.
* lib/rename.c: Likewise.
* lib/same-inode.h: Likewise.
* lib/secure_getenv.c: Likewise.
* lib/select.c: Likewise.
* lib/sethostname.c: Likewise.
* lib/setlocale.c: Likewise.
* lib/sigaction.c: Likewise.
* lib/sigprocmask.c: Likewise.
* lib/sleep.c: Likewise.
* lib/spawn-pipe.h: Likewise.
* lib/spawn-pipe.c: Likewise.
* lib/spawni.c: Likewise.
* lib/stat-time.h: Likewise.
* lib/stat-w32.c: Likewise.
* lib/stat.c: Likewise.
* lib/stdio.in.h: Likewise.
* lib/stdio-impl.h: Likewise.
* lib/stdio-read.c: Likewise.
* lib/stdio-write.c: Likewise.
* lib/stdlib.in.h: Likewise.
* lib/strerror_r.c: Likewise.
* lib/strftime-fixes.c: Likewise.
* lib/sys_stat.in.h: Likewise.
* lib/sys_types.in.h: Likewise.
* lib/sys_wait.in.h : Likewise.
* lib/system-quote.h: Likewise.
* lib/system-quote.c: Likewise.
* lib/tmpdir.c: Likewise.
* lib/tzset.c: Likewise.
* lib/uname.c: Likewise.
* lib/unistd.in.h: Likewise.
* lib/utime.in.h: Likewise.
* lib/utime.c: Likewise.
* lib/utimecmp.c: Likewise.
* lib/utimens.c: Likewise.
* lib/vasnprintf.c: Likewise.
* lib/vma-iter.h: Likewise.
* lib/vma-iter.c: Likewise.
* lib/wait-process.c: Likewise.
* lib/wcsftime.c: Likewise.
* lib/wctype.in.h: Likewise.
* lib/write.c: Likewise.
* tests/nap.h: Likewise.
* tests/test-cloexec.c: Likewise.
* tests/test-dup-safer.c: Likewise.
* tests/test-dup2.c: Likewise.
* tests/test-dup3.c: Likewise.
* tests/test-fcntl.c: Likewise.
* tests/test-get-rusage-data.c: Likewise.
* tests/test-getaddrinfo.c: Likewise.
* tests/test-getlogin.h: Likewise.
* tests/test-isatty.c: Likewise.
* tests/test-localename.c: Likewise.
* tests/test-mbrtowc-w32.c: Likewise.
* tests/test-nonblocking.c: Likewise.
* tests/test-nonblocking-pipe-main.c: Likewise.
* tests/test-nonblocking-socket-main.c: Likewise.
* tests/test-nonblocking-socket.h: Likewise.
* tests/test-pipe.c: Likewise.
* tests/test-pipe2.c: Likewise.
* tests/test-poll.c: Likewise.
* tests/test-pthread_sigmask1.c: Likewise.
* tests/test-select.h: Likewise.
* tests/test-sethostname2.c: Likewise.
* tests/test-sigprocmask.c: Likewise.
* tests/test-spawn-pipe-child.c: Likewise.
* tests/test-stat-time.c: Likewise.
* tests/test-system-quote-main.c: Likewise.
* tests/test-utimens-common.h: Likewise.
* tests/test-wcrtomb-w32.c: Likewise.
* m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
* m4/javacomp.m4 (gt_JAVACOMP): Likewise.
* m4/javaexec.m4 (gt_JAVAEXEC): Likewise.
* m4/locale-ar.m4 (gt_LOCALE_AR): Likewise.
* m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
* m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
* m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
* m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
* m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Likewise.
* m4/nocrash.m4 (GL_NOCRASH): Likewise.
* m4/pathmax.m4 (gl_PATHMAX_SNIPPET): Likewise.
* m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H): Likewise.
* m4/tmpfile.m4 (gl_FUNC_TMPFILE): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H): Likewise.

7 years agoautoupdate
Karl Berry [Thu, 3 May 2018 16:14:34 +0000 (09:14 -0700)]
autoupdate

7 years agolocalename: Fix test failures on mingw.
Bruno Haible [Wed, 2 May 2018 21:36:18 +0000 (23:36 +0200)]
localename: Fix test failures on mingw.

* lib/localename.c (gl_locale_name_thread): Remove code specific to
native Windows.
(gl_locale_name_posix): Move code specific to native Windows here.
* tests/test-localename.c (test_locale_name, test_locale_name_posix):
Accept result without charset suffix, as it appears on mingw.

7 years agoautoupdate
Karl Berry [Tue, 1 May 2018 16:38:31 +0000 (09:38 -0700)]
autoupdate

7 years agobootstrap: Avoid gnulib operations if not needed
Paul Smith [Sat, 28 Apr 2018 23:37:50 +0000 (16:37 -0700)]
bootstrap: Avoid gnulib operations if not needed

* build-aux/bootstrap: Remove unused variable gnulib_mk.
Set $gnulib_extra_files early so it can be overridden in .conf.
Remove redundant --import flag from $gnulib_tool_options.
Set $use_gnulib to false if no gnulib modules or files are needed.
If $use_gnulib is false, don't do anything related to gnulib.
A lot of this is just whitespace (indentation) changes.

7 years agomanywarnings: port to GCC 8.0
Paul Eggert [Sat, 28 Apr 2018 05:29:48 +0000 (22:29 -0700)]
manywarnings: port to GCC 8.0

* build-aux/gcc-warning.spec: Add -Wcatch-value,
-Wclass-memaccess, -Wdo-subscript, -Wextra-semi.  Adjust to the
fact that the GCC help message now mentions operands for
-Warray-bounds, -Wformat, -Wformat-overflow, -Wformat-truncation,
-Wimplicit-fallthrough, -Wplacement-new, -Wshift-overflow,
-Wstrict-aliasing, -Wstrict-overflow, -Wstringop-overflow,
and -Wunused-const-variable.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wattribute-alias,
-Wcast-align=strict, -Wcast-function-type, -Wif-not-aligned,
-Wmissing-attributes, -Wmultistatement-macros,
-Wpacked-not-aligned, -Wsizeof-pointer-div, -Wstringop-truncation,
-Wsuggest-attribute=cold, -Wsuggest-attribute=malloc.

7 years agosys_socket: Make SO_REUSEPORT available across platforms.
Bruno Haible [Tue, 24 Apr 2018 18:04:05 +0000 (20:04 +0200)]
sys_socket: Make SO_REUSEPORT available across platforms.

Reported by Tom G. Christensen <tgc@jupiterrise.com>.

* lib/sys_socket.in.h (SO_REUSEPORT): New macro.
* doc/posix-headers/sys_socket.texi: Mention the issue.
* tests/test-poll.c (SO_REUSEPORT): Remove.
* tests/test-select.h: Include <sys/socket.h>.
(SO_REUSEPORT): Remove.
* modules/select-tests (Depends-on): Add 'sys_socket'.

7 years agoautoupdate
Karl Berry [Tue, 24 Apr 2018 15:09:57 +0000 (08:09 -0700)]
autoupdate

7 years agolocalcharset: short-circuit the search for an alias on a Mac
Benno Schulenberg [Sat, 21 Apr 2018 09:08:08 +0000 (11:08 +0200)]
localcharset: short-circuit the search for an alias on a Mac

* lib/localcharset.c (get_charset_aliases): Add a tautological
UTF-8 entry to speed up the search for this case.

Most machines default to a UTF-8 locale nowadays, so begin the
list of aliases with a dummy UTF-8 entry so it will be found
immediately and a time-consuming search through the rest of
the list is avoided.

7 years agoautoupdate
Karl Berry [Mon, 16 Apr 2018 15:20:53 +0000 (08:20 -0700)]
autoupdate

7 years agofts: add comment
Paul Eggert [Wed, 11 Apr 2018 23:27:03 +0000 (16:27 -0700)]
fts: add comment

* lib/fts.c (fts_build): Explain why ==, not >.
See remark by Bernhard Voelker in:
https://lists.gnu.org/r/bug-gnulib/2018-04/msg00041.html

7 years agofts: fix bug in find across filesystems
Paul Eggert [Wed, 11 Apr 2018 19:50:35 +0000 (12:50 -0700)]
fts: fix bug in find across filesystems

This fixes a bug I introduced last summer.
Problem reported by Kamil Dudka in:
https://lists.gnu.org/r/bug-gnulib/2018-04/msg00033.html
* lib/fts.c (filesystem_type, dirent_inode_sort_may_be_useful)
(leaf_optimization):
New arg for file descriptor.  All callers changed.
(fts_build): Check for whether inodes should be sorted
before closing the directory.

7 years agoFix last ChangeLog entry.
Bruno Haible [Sat, 7 Apr 2018 17:36:33 +0000 (19:36 +0200)]
Fix last ChangeLog entry.

7 years agounicase/u*-context: Fix link errors with libunistring <= 0.9.9.
Bruno Haible [Sat, 7 Apr 2018 17:32:31 +0000 (19:32 +0200)]
unicase/u*-context: Fix link errors with libunistring <= 0.9.9.

Reported by Genki Sky <sky@genki.is>.

* modules/unicase/u8-prefix-context (configure.ac): Require libunistring
version 0.9.10 or newer.
* modules/unicase/u8-suffix-context (configure.ac): Likewise.
* modules/unicase/u16-prefix-context (configure.ac): Likewise.
* modules/unicase/u16-suffix-context (configure.ac): Likewise.
* modules/unicase/u32-prefix-context (configure.ac): Likewise.

7 years agoexecute: Update comment.
Bruno Haible [Sat, 7 Apr 2018 17:18:59 +0000 (19:18 +0200)]
execute: Update comment.

* lib/execute.h (execute): Refer to spawn-pipe.h, not pipe.h.

7 years agofts: treat CIFS like NFS
Paul Eggert [Thu, 5 Apr 2018 15:48:01 +0000 (08:48 -0700)]
fts: treat CIFS like NFS

Problem reported by Kamil Dudka in:
https://lists.gnu.org/r/bug-gnulib/2018-04/msg00015.html
* lib/fts.c (S_MAGIC_CIFS): New macro.
(dirent_inode_sort_may_be_useful, leaf_optimization):
Treat CIFS like NFS.

7 years agoc-stack: Fix possible build failure on some platforms.
Bruno Haible [Wed, 28 Mar 2018 20:43:04 +0000 (22:43 +0200)]
c-stack: Fix possible build failure on some platforms.

* lib/c-stack.c (die): Define whenever this function is referenced.

7 years agotime_rz: fix workaround for Mac OS X 10.6 infloop
Paul Eggert [Wed, 28 Mar 2018 19:45:45 +0000 (12:45 -0700)]
time_rz: fix workaround for Mac OS X 10.6 infloop

Problems reported by Charles A. Roelli (Bug#27736#117).
* m4/time_rz.m4 (gl_TIME_RZ): Use a slightly different timestamp.
Also, discard output, which clutters the 'configure' log.

7 years agohavelib: port to Solaris 10 /bin/sh
Paul Eggert [Wed, 28 Mar 2018 01:20:18 +0000 (18:20 -0700)]
havelib: port to Solaris 10 /bin/sh

* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Use 'test ! EXPR'
instead of '! test EXPR'.

7 years agotime_rz: work around Mac OS X 10.6 infloop
Paul Eggert [Tue, 27 Mar 2018 02:23:33 +0000 (19:23 -0700)]
time_rz: work around Mac OS X 10.6 infloop

* doc/posix-functions/localtime.texi:
* doc/posix-functions/localtime_r.texi: Mention the bug.
* lib/time_rz.c (localtime_rz): Work around the bug.  It’d be
better to fix localtime and localtime_r instead, but that would be
more work and is not needed to fix the Emacs problem.
* m4/time_rz.m4 (gl_TIME_RZ): Detect the bug.

7 years agotest-version-etc.sh: don't use diff directly: use init.sh's compare
Jim Meyering [Sat, 24 Mar 2018 16:48:47 +0000 (09:48 -0700)]
test-version-etc.sh: don't use diff directly: use init.sh's compare

We'd rather not sacrifice readable "diff -u" output even for
"diff -c" output (not supported by busybox) or for even less
readable ed-style "diff" output.  So use init.sh's compare function
* tests/test-version-etc.sh: Source init.sh and add "." to path.
Remove "./" from invocation of test-version-etc, so we use path.
And s/diff/compare/.
* modules/version-etc-tests (Depends-on): Add test-framework-sh,
to get init.sh.
Prompted by Eric Blake's comments in
https://lists.gnu.org/r/sed-devel/2018-03/msg00015.html

7 years agojavacomp-script, javacomp: Add support for Java 10.
Bruno Haible [Sat, 24 Mar 2018 12:16:21 +0000 (13:16 +0100)]
javacomp-script, javacomp: Add support for Java 10.

* m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 10 and
target-version 10.
* lib/javaversion.h: Update comments.
* lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
source_version_index, get_goodcode_snippet, get_failcode_snippet,
TARGET_VERSION_BOUND, target_version_index,
corresponding_classfile_version): Accept source_version 10 and
target_version 10.
* lib/javacomp.h: Update comments accordingly.

7 years agojavacomp-script, javacomp: Update comments.
Bruno Haible [Sat, 24 Mar 2018 11:55:42 +0000 (12:55 +0100)]
javacomp-script, javacomp: Update comments.

* m4/javacomp.m4: Update comments regarding gcj.
* lib/javacomp.h: Likewise.

7 years agojavacomp-script, javacomp: Fix support for Java 7, 8, 9.
Bruno Haible [Sat, 24 Mar 2018 11:54:42 +0000 (12:54 +0100)]
javacomp-script, javacomp: Fix support for Java 7, 8, 9.

* lib/javaversion.h: Update comments.
* lib/javacomp.h: Likewise.
* lib/javacomp.c (default_target_version, source_version_index,
get_goodcode_snippet, get_failcode_snippet): Recognize "9" instead of
"1.9".
(TARGET_VERSION_BOUND): Bump to 9.
(target_version_index, corresponding_classfile_version): Recognize "9"
instead of "1.9".
(get_source_version_for_javac): New function.
(is_envjavac_nongcj_usable, is_javac_usable): Add
source_version_for_javac argument.
(compile_java_class): Determine and pass source_version_for_javac.
* m4/javacomp.m4: Recognize version '9' instead of '1.9'. When invoking
$JAVAC or javac, pass '-source 1.6' instead of '-source 1.5' when
appropriate.

7 years agotest-version-etc.sh: port to diff without -c
Jim Meyering [Fri, 23 Mar 2018 23:46:13 +0000 (16:46 -0700)]
test-version-etc.sh: port to diff without -c

* tests/test-version-etc.sh: Don't use diff's -c option.
This caused spurious test failure on Alpine Linux, which
uses busybox's diff. Reported by Assaf Gordon in
https://lists.gnu.org/r/sed-devel/2018-03/msg00013.html

7 years agoc-stack: port to recent GCC build
Paul Eggert [Fri, 23 Mar 2018 18:26:15 +0000 (11:26 -0700)]
c-stack: port to recent GCC build

Problem reported by The Fireplace (Bug#30913).
* lib/c-stack.c (die): Define only if used.

7 years agoeuidaccess: Port to native Windows.
Bruno Haible [Tue, 20 Mar 2018 07:37:44 +0000 (08:37 +0100)]
euidaccess: Port to native Windows.

* lib/euidaccess.c (euidaccess): On native Windows, just use _access().
* posix-modules (exclude_for_mingw): Remove 'euidaccess'.

7 years agojavacomp: Add support for Java 7, 8, 9.
Bruno Haible [Mon, 19 Mar 2018 23:39:01 +0000 (00:39 +0100)]
javacomp: Add support for Java 7, 8, 9.

* lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
source_version_index, get_goodcode_snippet, get_failcode_snippet,
corresponding_classfile_version): Accept source_version 1,7, 1.8, 1.9
and target_version 1,7, 1.8, 1.9.
* lib/javacomp.h: Update comments accordingly.

7 years agojavacomp-script: Add support for Java 9.
Bruno Haible [Mon, 19 Mar 2018 23:33:19 +0000 (00:33 +0100)]
javacomp-script: Add support for Java 9.

* m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 1.9 and
target-version 1.9.

7 years agoSpelling fix
Paul Eggert [Sun, 18 Mar 2018 04:07:51 +0000 (21:07 -0700)]
Spelling fix

7 years agoglob: Don't compile replacements on recent glibc systems.
Bruno Haible [Fri, 16 Mar 2018 15:25:02 +0000 (16:25 +0100)]
glob: Don't compile replacements on recent glibc systems.

* lib/glob.in.h: Use the usual idiom for the double-inclusion guard. If
REPLACE_GLOB is 0, include the system's <glob.h> and use
_GL_CXXALIAS_SYS.
* m4/glob.m4 (gl_GLOB): Set REPLACE_GLOB instead of GLOB_H. Accept
_GNU_GLOB_INTERFACE_VERSION 2 as well. Delete the file conf$$-globtest
inside the AC_RUN_IFELSE block. Remove GL_GENERATE_GLOB_H conditional.
* modules/glob (Dependencies): Test REPLACE_GLOB instead of GLOB_H.
Remove snippet/warn-on-use.
(configure.ac): Test REPLACE_GLOB instead of GLOB_H.
(Makefile.am): Create glob.h always. Update list of substitutions in
glob.h. Don't depend on $(WARN_ON_USE_H).

7 years agoglob: Fix link error on native Windows.
Bruno Haible [Fri, 16 Mar 2018 13:05:42 +0000 (14:05 +0100)]
glob: Fix link error on native Windows.

* modules/glob (Depends-on): Add 'lstat'.

7 years agoglob: Fix compilation error in C++ mode.
Bruno Haible [Thu, 15 Mar 2018 22:56:03 +0000 (23:56 +0100)]
glob: Fix compilation error in C++ mode.

* lib/glob.in.h (_Restrict_): Define, like in regex.h and spawn.in.h.

7 years agohost-cpu-c-abi: Support for RISC-V CPU.
Bruno Haible [Thu, 15 Mar 2018 21:26:09 +0000 (22:26 +0100)]
host-cpu-c-abi: Support for RISC-V CPU.

* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Recognize the various
riscv32 and riscv64 ABIs.
References:
https://github.com/riscv/riscv-toolchain-conventions
https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/RISC-V-Options.html
https://gnu-mcu-eclipse.github.io/toolchain/riscv/

7 years agoautoupdate
Karl Berry [Tue, 13 Mar 2018 15:53:44 +0000 (08:53 -0700)]
autoupdate

7 years agoautoupdate
Karl Berry [Mon, 12 Mar 2018 20:40:45 +0000 (13:40 -0700)]
autoupdate

7 years agoautoupdate
Paul Eggert [Mon, 12 Mar 2018 02:01:28 +0000 (19:01 -0700)]
autoupdate

7 years agoautoupdate
Karl Berry [Sun, 11 Mar 2018 21:42:07 +0000 (14:42 -0700)]
autoupdate

7 years agofflush: be more paranoid about libio.h change
Paul Eggert [Fri, 9 Mar 2018 00:42:45 +0000 (16:42 -0800)]
fflush: be more paranoid about libio.h change

Suggested by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-03/msg00270.html
* lib/fbufmode.c (fbufmode):
* lib/fflush.c (clear_ungetc_buffer_preserving_position)
(disable_seek_optimization, rpl_fflush):
* lib/fpending.c (__fpending):
* lib/fpurge.c (fpurge):
* lib/freadable.c (freadable):
* lib/freadahead.c (freadahead):
* lib/freading.c (freading):
* lib/freadptr.c (freadptr):
* lib/freadseek.c (freadptrinc):
* lib/fseeko.c (fseeko):
* lib/fseterr.c (fseterr):
* lib/fwritable.c (fwritable):
* lib/fwriting.c (fwriting):
Look at _IO_ftrylockfile as well as at _IO_EOF_SEEN.

7 years agoautoupdate
Paul Eggert [Thu, 8 Mar 2018 01:26:25 +0000 (17:26 -0800)]
autoupdate

7 years agoautoupdate
Paul Eggert [Thu, 8 Mar 2018 00:44:58 +0000 (16:44 -0800)]
autoupdate

7 years agoautoupdate
Paul Eggert [Wed, 7 Mar 2018 19:45:17 +0000 (11:45 -0800)]
autoupdate

7 years agomaint: write-file-hooks -> before-save-hook
Paul Eggert [Wed, 7 Mar 2018 08:29:38 +0000 (00:29 -0800)]
maint: write-file-hooks -> before-save-hook

write-file-hooks is obsolete since Emacs 22.1 (released June 2007) and
it's time to use the recommended replacement.
Problem reported by Glenn Morris in:
https://lists.gnu.org/r/bug-gnulib/2018-03/msg00008.html
* build-aux/announce-gen, build-aux/bootstrap:
* build-aux/do-release-commit-and-tag, build-aux/gendocs.sh:
* build-aux/git-version-gen, build-aux/gitlog-to-changelog:
* build-aux/gnu-web-doc-update, build-aux/gnupload:
* build-aux/move-if-change, build-aux/prefix-gnulib-mk:
* build-aux/update-copyright, build-aux/useless-if-before-free:
* build-aux/vc-list-files:
Update hook usage for files where Gnulib is the canonical source.

7 years agoautoupdate
Paul Eggert [Wed, 7 Mar 2018 04:29:14 +0000 (20:29 -0800)]
autoupdate

7 years agobinary-io: pacify gcc -Wunused-parameter
Paul Eggert [Mon, 5 Mar 2018 23:30:56 +0000 (15:30 -0800)]
binary-io: pacify gcc -Wunused-parameter

Problem reported by Reuben Thomas in:
https://lists.gnu.org/r/bug-gnulib/2018-03/msg00005.html
* lib/binary-io.h (__gl_setmode, __gl_setmode_check):
Use _GL_UNUSED where appropriate.

7 years agofflush: adjust to glibc 2.28 libio.h removal
Paul Eggert [Mon, 5 Mar 2018 18:56:29 +0000 (10:56 -0800)]
fflush: adjust to glibc 2.28 libio.h removal

Problem reported by Daniel P. Berrangé in:
https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
* lib/fbufmode.c (fbufmode):
* lib/fflush.c (clear_ungetc_buffer_preserving_position)
(disable_seek_optimization, rpl_fflush):
* lib/fpending.c (__fpending):
* lib/fpurge.c (fpurge):
* lib/freadable.c (freadable):
* lib/freadahead.c (freadahead):
* lib/freading.c (freading):
* lib/freadptr.c (freadptr):
* lib/freadseek.c (freadptrinc):
* lib/fseeko.c (fseeko):
* lib/fseterr.c (fseterr):
* lib/fwritable.c (fwritable):
* lib/fwriting.c (fwriting):
Check _IO_EOF_SEEN instead of _IO_ftrylockfile.
* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
Define if not already defined.

7 years agoautoupdate
Karl Berry [Thu, 1 Mar 2018 16:26:50 +0000 (08:26 -0800)]
autoupdate

7 years agoautoupdate
Karl Berry [Wed, 28 Feb 2018 19:09:30 +0000 (11:09 -0800)]
autoupdate

7 years agoenviron: fix link error on 32-bit Cygwin
Paul Eggert [Tue, 27 Feb 2018 17:04:42 +0000 (09:04 -0800)]
environ: fix link error on 32-bit Cygwin

Problem reported for GNU Emacs by Ken Brown in:
https://lists.gnu.org/r/emacs-devel/2018-02/msg00765.html
* lib/unistd.in.h (environ) [__i386__]: Do not redeclare.

7 years agoautoupdate
Karl Berry [Mon, 26 Feb 2018 16:32:38 +0000 (08:32 -0800)]
autoupdate

7 years agombrtowc tests: Fix regression on glibc.
Bruno Haible [Sun, 25 Feb 2018 00:56:35 +0000 (01:56 +0100)]
mbrtowc tests: Fix regression on glibc.

Reported by Bernhard Voelker.

* tests/test-mbrtowc.c (main): Fix expected value of wc.

7 years agoautoupdate
Karl Berry [Sat, 24 Feb 2018 16:55:16 +0000 (08:55 -0800)]
autoupdate

7 years agostriconveha, uniconv/*: Avoid test failures on musl libc.
Bruno Haible [Sat, 24 Feb 2018 14:21:11 +0000 (15:21 +0100)]
striconveha, uniconv/*: Avoid test failures on musl libc.

* tests/iconvsupport.c: New file.
* tests/test-striconveha.c (main): Skip autodetect_jp tests if iconv()
does not support the ISO-2022-JP-2 encoding.
* tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
* modules/striconveha-tests (Files): Add tests/iconvsupport.c.
(Makefile.am): Link test-striconveha with iconvsupport.o.
* modules/uniconv/u8-conv-from-enc-tests (Files): Add
tests/iconvsupport.c.
(Makefile.am): Link test-u8-conv-from-enc with iconvsupport.o.
* modules/uniconv/u8-strconv-from-enc-tests (Files): Add
tests/iconvsupport.c.
(Makefile.am): Link test-u8-strconv-from-enc with iconvsupport.o.
* modules/uniconv/u16-conv-from-enc-tests (Files): Add
tests/iconvsupport.c.
(Makefile.am): Link test-u16-conv-from-enc with iconvsupport.o.
* modules/uniconv/u16-strconv-from-enc-tests (Files): Add
tests/iconvsupport.c.
(Makefile.am): Link test-u16-strconv-from-enc with iconvsupport.o.
* modules/uniconv/u32-conv-from-enc-tests (Files): Add
tests/iconvsupport.c.
(Makefile.am): Link test-u32-conv-from-enc with iconvsupport.o.
* modules/uniconv/u32-strconv-from-enc-tests (Files): Add
tests/iconvsupport.c.
(Makefile.am): Link test-u32-strconv-from-enc with iconvsupport.o.

7 years agolocalename: Add support for musl libc.
Bruno Haible [Sat, 24 Feb 2018 11:59:59 +0000 (12:59 +0100)]
localename: Add support for musl libc.

* m4/localename.m4 (gl_LOCALENAME): Check for <langinfo.h>.
* lib/localename.c (gl_locale_name_thread_unsafe): Use NL_LOCALE_NAME
on Linux platforms which define NL_LOCALE_NAME.

7 years agombrtowc tests: Don't make assumptions about the charset the C locale.
Bruno Haible [Sat, 24 Feb 2018 11:01:30 +0000 (12:01 +0100)]
mbrtowc tests: Don't make assumptions about the charset the C locale.

* tests/test-mbrtowc.c (main): For bytes >= 0x80, don't assume a
particular mapping in the C locale.

7 years agoptsname_r: Don't expect that this function sets errno.
Bruno Haible [Sat, 24 Feb 2018 09:53:24 +0000 (10:53 +0100)]
ptsname_r: Don't expect that this function sets errno.

* tests/test-ptsname_r.c (test_errors): Don't test errno after return
from ptsname_r().
* doc/glibc-functions/ptsname_r.texi: Mention the issue.

7 years agoxmalloca: pacify gcc -Wbad-function-cast
Bruno Haible [Sat, 24 Feb 2018 00:33:35 +0000 (01:33 +0100)]
xmalloca: pacify gcc -Wbad-function-cast

* lib/xmalloca.h (xmalloca): Insert intermediate cast here as well.

7 years agonl_langinfo: pacify gcc -Wunused-function
Paul Eggert [Fri, 23 Feb 2018 21:15:24 +0000 (13:15 -0800)]
nl_langinfo: pacify gcc -Wunused-function

* lib/nl_langinfo.c (ctype_codeset): Do not define if
REPLACE_NL_LANGINFO && !GNULIB_defined_CODESET, as it is unused in
this case.  Without this change, I got a diagnostic when building
coreutils on Fedora 27 with gcc 7.3.1 20180130.

7 years agosame: pacify gcc -Wunused-variable
Paul Eggert [Fri, 23 Feb 2018 20:52:42 +0000 (12:52 -0800)]
same: pacify gcc -Wunused-variable

* lib/same.c (same_nameat) [!CHECK_TRUNCATION]:
Omit unused variable.

7 years agomalloca: pacify gcc -Wbad-function-cast
Paul Eggert [Fri, 23 Feb 2018 20:47:38 +0000 (12:47 -0800)]
malloca: pacify gcc -Wbad-function-cast

* lib/malloca.h (malloca): Pacify gcc -Wbad-function-cast
diagnostic that I got on Fedora 27 with gcc 7.3.1 20180130.
To pacify GCC, I had to cast alloca’s result to some type other
than void * before casting that to uintptr_t.

7 years agoautoupdate
Karl Berry [Thu, 22 Feb 2018 15:43:48 +0000 (07:43 -0800)]
autoupdate

7 years agoutimecmp: new function utimecmpat
Paul Eggert [Tue, 20 Feb 2018 17:06:51 +0000 (09:06 -0800)]
utimecmp: new function utimecmpat

* lib/utimecmp.c: Include fcntl.h, sys/stat.h and dirname.h.
Do not include utimens.h.
(utimecmpat): New function, generalizing utimecmp.
(utimecmp): Now a thin layer around utimecmpat.
* modules/utimecmp (Depends-on): Depend on dirname-lgpl, fstatat,
utimensat instead of on lstat and utimens.

7 years agosame: new function same_nameat
Paul Eggert [Tue, 20 Feb 2018 17:05:48 +0000 (09:05 -0800)]
same: new function same_nameat

* lib/same.c: Include fcntl.h.
* lib/same.c (same_nameat): New function, generalizing same_name.
(same_name): Now a thin layer around same_nameat.
* m4/same.m4 (gl_SAME): Check for fpathconf, not pathconf.
* modules/same (Depends-on): Depend on fstatat, openat.

7 years agowarnings: Add support for Objective C.
Eric Gallager [Sun, 18 Feb 2018 14:41:09 +0000 (15:41 +0100)]
warnings: Add support for Objective C.

* m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): New
macro.

7 years agolock: Fix test-once1 crash on FreeBSD11.
Bruno Haible [Sat, 17 Feb 2018 09:23:35 +0000 (10:23 +0100)]
lock: Fix test-once1 crash on FreeBSD11.

* lib/glthread/lock.h: On FreeBSD, test the weak value of the symbol
'pthread_create', not 'pthread_cancel'.

7 years agolock: Add test of gl_once.
Bruno Haible [Sat, 17 Feb 2018 09:05:01 +0000 (10:05 +0100)]
lock: Add test of gl_once.

* tests/test-once.c: New file.
* modules/lock-tests (Files): Add it.
(Makefile.am): Build and test programs 'test-once1' and 'test-once2'.

7 years agothread: Fix compilation error on IRIX.
Bruno Haible [Sat, 17 Feb 2018 08:55:43 +0000 (09:55 +0100)]
thread: Fix compilation error on IRIX.

* lib/glthread/thread.h: Include <unistd.h>. Include <signal.h> when
needed; include it outside the C++ extern "C" {} block.
* doc/posix-headers/pthread.texi: Mention the problem with
pthread_atfork on IRIX.

7 years agonl_langinfo: Override the system's nl_langinfo() when needed.
Bruno Haible [Sun, 4 Feb 2018 10:00:38 +0000 (11:00 +0100)]
nl_langinfo: Override the system's nl_langinfo() when needed.

Reported by Jim Meyering.

* m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Set REPLACE_NL_LANGINFO=1
also when HAVE_LANGINFO_T_FMT_AMPM or HAVE_LANGINFO_ALTMON is 0.

7 years agosignal-h, monetary, strings: Fix build failure in some cases.
Bruno Haible [Sun, 4 Feb 2018 09:42:45 +0000 (10:42 +0100)]
signal-h, monetary, strings: Fix build failure in some cases.

Reported by Tim Rühsen <tim.ruehsen@gmx.de>.

* modules/signal-h (Makefile.am): In the GNULIB_* substitutions, use '/'
as delimiter in sed command, not '|'.
* modules/monetary (Makefile.am): Likewise.
* modules/strings (Makefile.am): Likewise.

7 years agomaint.mk: exempt "/proc/filesystems" from "file system" syntax check
Jim Meyering [Sun, 4 Feb 2018 00:57:36 +0000 (16:57 -0800)]
maint.mk: exempt "/proc/filesystems" from "file system" syntax check

* top/maint.mk (sc_file_system): Don't complain about
"/proc/filesystems".

7 years agostdlib: Fix compilation error on OpenIndiana.
Bruno Haible [Sat, 3 Feb 2018 13:05:45 +0000 (14:05 +0100)]
stdlib: Fix compilation error on OpenIndiana.

* lib/stdlib.in.h: Before including <sys/loadavg.h>, include
<sys/time.h>.
* m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
* m4/getloadavg.m4 (gl_GETLOADAVG): Likewise.

7 years agohost-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana.
Bruno Haible [Sat, 3 Feb 2018 11:50:17 +0000 (12:50 +0100)]
host-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana.

* m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX): Require AC_PROG_EGREP,
and use $EGREP instead of 'grep -E'.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Use 'grep' instead of
'grep -E'.

7 years agomalloca: Add a compile-time verification.
Paul Eggert [Fri, 2 Feb 2018 23:47:15 +0000 (00:47 +0100)]
malloca: Add a compile-time verification.

* lib/malloca.c (small_t): Verify that it is wide enough.
* modules/malloca (Depends-on): Add verify.

7 years agomalloca: Add an argument check.
Bruno Haible [Fri, 2 Feb 2018 23:32:41 +0000 (00:32 +0100)]
malloca: Add an argument check.

Suggested by Paul Eggert.

* lib/malloca.c (freea): Check against an invalid argument.

7 years agolocalename: Add support for OpenIndiana.
Bruno Haible [Fri, 2 Feb 2018 20:34:14 +0000 (21:34 +0100)]
localename: Add support for OpenIndiana.

* lib/localename.c (gl_locale_name_thread_unsafe): Add code for
Solaris 11 variants with uselocale() but without getlocalename_l().

7 years agomalloca, xmalloca: Make multithread-safe.
Bruno Haible [Fri, 2 Feb 2018 18:32:02 +0000 (19:32 +0100)]
malloca, xmalloca: Make multithread-safe.

Reported by Florian Weimer <fweimer@redhat.com>.
Implements an idea by Ondřej Bílka <neleai@seznam.cz>.

* lib/malloca.h (malloca): In the stack allocation case, return a
pointer that is a multiple of 2 * sa_alignment_max.
(sa_increment): Remove enum item.
* lib/xmalloca.h (xmalloca): In the stack allocation case, return
a pointer that is a multiple of 2 * sa_alignment_max.
* lib/malloca.c (NO_SANITIZE_MEMORY): Remove macro.
(MAGIC_NUMBER, MAGIC_SIZE, preliminary_header, HEADER_SIZE, header,
HASH_TABLE_SIZE, mmalloca_results): Remove.
(small_t): New type.
(mmalloca, free): Rewritten.
* lib/malloca.valgrind: Remove file.
* modules/malloca (Files): Remove it.
(Depends-on): Remove verify.

7 years agoenviron: Fix link error on 64-bit Cygwin.
Bruno Haible [Wed, 31 Jan 2018 08:04:52 +0000 (09:04 +0100)]
environ: Fix link error on 64-bit Cygwin.

* lib/unistd.in.h (environ): On Cygwin, redeclare with the
__declspec(dllimport) attribute.
* doc/posix-functions/environ.texi: Mention the Cygwin problem.

7 years agoget-rusage-data: Add support for Minix 3.
Bruno Haible [Tue, 30 Jan 2018 08:05:57 +0000 (09:05 +0100)]
get-rusage-data: Add support for Minix 3.

* lib/get-rusage-data.c (get_rusage_data): Return 0 on Minix.

7 years agovma-iter: Add support for Minix 3.
Bruno Haible [Tue, 30 Jan 2018 08:02:46 +0000 (09:02 +0100)]
vma-iter: Add support for Minix 3.

* lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Minix.
* lib/vma-iter.c: On Minix, read /proc/<pid>/map.

7 years agoFix malfunction of socket functions on HP-UX in 64-bit mode.
Bruno Haible [Sat, 27 Jan 2018 09:57:59 +0000 (10:57 +0100)]
Fix malfunction of socket functions on HP-UX in 64-bit mode.

* m4/socketlib.m4 (gl_SOCKETLIB): Add comment.
* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define
_HPUX_ALT_XOPEN_SOCKET_API.
* modules/accept (Depends-on): Add 'extensions'.
* modules/getpeername (Depends-on): Likewise.
* modules/getsockname (Depends-on): Likewise.
* modules/getsockopt (Depends-on): Likewise.
* modules/recvfrom (Depends-on): Likewise.
* doc/posix-functions/accept.texi: Mention the HP-UX socklen_t problem.
* doc/posix-functions/getpeername.texi: Likewise.
* doc/posix-functions/getsockname.texi: Likewise.
* doc/posix-functions/getsockopt.texi: Likewise.
* doc/posix-functions/recvfrom.texi: Likewise.

7 years agogetsockname tests: More tests.
Bruno Haible [Sat, 27 Jan 2018 07:52:31 +0000 (08:52 +0100)]
getsockname tests: More tests.

* tests/test-getsockname.c (open_server_socket): New function, mostly
copied from test-poll.c.
(main): Check that getsockname fills in addr.
* modules/getsockname-tests (Depends-on): Add the necessary
dependencies.
(test_getsockname_LDADD): Link with $(INET_PTON_LIB).

7 years agomanywarnings: fix maintainer comment
Paul Eggert [Sat, 27 Jan 2018 02:08:36 +0000 (18:08 -0800)]
manywarnings: fix maintainer comment

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Fix comment so that
it does not mistakenly think that ‘-1)’ is an option.

7 years agoautoupdate
Karl Berry [Fri, 26 Jan 2018 16:52:43 +0000 (08:52 -0800)]
autoupdate

7 years agolanginfo: Fix last commit.
Bruno Haible [Fri, 26 Jan 2018 04:51:55 +0000 (05:51 +0100)]
langinfo: Fix last commit.

Reported by Tim Rühsen <tim.ruehsen@gmx.de>.

* modules/langinfo (Makefile.am): Substitute HAVE_LANGINFO_ALTMON.

7 years agolanginfo, nl_langinfo: Add support for alternative month names.
Bruno Haible [Wed, 24 Jan 2018 09:02:17 +0000 (10:02 +0100)]
langinfo, nl_langinfo: Add support for alternative month names.

* m4/langinfo_h.m4 (gl_LANGINFO_H): Define HAVE_LANGINFO_ALTMON.
* lib/langinfo.in.h (ALTMON_1...ALTMON_12): New macros.
* lib/nl_langinfo.c (rpl_nl_langinfo): Treat ALTMON_i like MON_i.
* tests/test-nl_langinfo.c (main): Test ALTMON_*.
* doc/posix-headers/langinfo.texi: Document support of ALTMON_*.
* doc/posix-functions/nl_langinfo.texi: Likewise.

7 years agoMerge strftime.c changes from glibc
Paul Eggert [Tue, 23 Jan 2018 08:42:04 +0000 (00:42 -0800)]
Merge strftime.c changes from glibc

This incorporates:
2017-11-14 [BZ #10871] Implement alternative month names
2017-11-14 [BZ #10871] Abbreviated alternative month names (%Ob)
2017-06-20 Use locale_t, not __locale_t, throughout glibc
* lib/nstrftime.c (ABALTMON_1) [!COMPILE_WIDE]: New macro.
(LOCALE_PARAM) [_LIBC && USE_IN_EXTENDED_LOCALE_MODEL]:
Use locale_t, not __locale_t.
(a_altmonth, f_altmonth, aam_len) [_NL_CURRENT]: New macros.
(__strftime_internal): Add support for alternate months.